diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-10-03 17:03:26 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-10-03 17:03:26 +0100 |
| commit | 6fd6ed2182a13dd8ebde05bdef6cfc96df370086 (patch) | |
| tree | 85a9eaacb687655d8c05e8d58af7f81061d20f5f /rotord/src | |
| parent | b703d2bb1d101e20c85e1addeff917407558cd76 (diff) | |
relative timelines
Diffstat (limited to 'rotord/src')
| -rw-r--r-- | rotord/src/rotor.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 385c3fe..72f1ea4 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -406,6 +406,9 @@ namespace Rotor { }; #define CYCLER_cut 1 #define CYCLER_mix 2 + #define CYCLER_abs 1 + #define CYCLER_rel 2 + #define CYCLER_stretch 3 //new mode that remaps sequence length to segments //combined with a video mode that maps video length to duration //or @@ -415,7 +418,7 @@ namespace Rotor { create_image_input("Image input","Image input"); create_signal_input("Selector","Selector input"); create_attribute("mode","Cycling mode {cut|mix}","Mode","cut",{"cut","mix"}); - create_attribute("time_mode","Time mode {abs|rel}","time mode","abs",{"abs","rel"}); + create_attribute("time_mode","Time mode {abs|rel}","time mode","abs",{"abs","rel","stretch"}); title="Video cycler"; description="Cycles through video inputs according to selector signal"; duplicate_inputs=true; @@ -426,6 +429,16 @@ namespace Rotor { ~Video_cycler(){}; bool load(const string &filename); Image *output(const Frame_spec &frame){ + Frame_spec inframe=frame; + switch (attributes["time_mode"]->intVal){ + case CYCLER_abs: + inframe=frame; + break; + case CYCLER_rel: + break; + case CYCLER_stretch: + break; + } if (attributes["mode"]->intVal==CYCLER_mix&&image_inputs.size()>1){ int im1=((int)inputs[0]->get((Time_spec)frame))%image_inputs.size(); int im2=(im1+1)%image_inputs.size(); |
