summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-11-06 16:32:57 +0000
committerTim Redfern <tim@eclectronics.org>2013-11-06 16:32:57 +0000
commit7bad151df4b0b8b876ac3e32077c712975d3eee9 (patch)
tree7df3cdc0d08f54de2f53595548afb123f65ce3b0 /rotord/src
parent5af4b4e30889b4002bade73336dc0329901d9623 (diff)
making video bank
Diffstat (limited to 'rotord/src')
-rw-r--r--rotord/src/rotor.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index e44c753..4c71c84 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -629,7 +629,7 @@ namespace Rotor {
int thisframe=((Time_spec)frame).frame();
switch (attributes["frame_mode"]->intVal){
case VIDEOTIME_play:
- if(thisframe==lastframe+1){
+ if(thisframe==lastframe||thisframe==lastframe+1){
if (segment!=wv){
//start of new segment
cerr<<"segment "<<wv<<" started: "<<((Time_spec)frame).time<<endl;
@@ -639,9 +639,14 @@ namespace Rotor {
}
else {
//find segment start
- //while ()
+ Time_spec testframe=(Time_spec)frame.lastframe();
+ while ((int)inputs[0]->get(testframe)==wv&&testframe.frame()>0){
+ testframe=testframe.lastframe();
+ }
+ segment_start=testframe.time;
}
- wanted=ph*player.get_number_frames();
+ wanted=(((Time_spec)frame).time-segment_start)*player.get_framerate();
+ lastframe=thisframe;
break;
case VIDEOTIME_stretch:
wanted=ph*player.get_number_frames();