diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-06-29 13:45:59 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-06-29 13:48:34 +0300 |
commit | 302b04a5a3fc0e767ac784424f78ce2edf5d2844 (patch) | |
tree | def4de621fbb0a194b350da781f054c6aefbab35 /source/blender/makesdna/DNA_sequence_types.h | |
parent | c51b8ec86364585c4088837c603b39752065bc34 (diff) |
VSE: Improved Retiming system
Patch implements better way to control playback speed than it is
possible to do with speed effect. Speed factor property can be set in
Time panel.
There are 2 layers of control:
Option to retime movie to match scene FPS rate.
Custom speed factor to control playback rate.
Since playback rate is strip property, it is now possible to manipulate
strip as normal one even if it is retimed.
To facilitate manipulation, some functions need to consider speed factor
and apply necessary corrections to strip offset or strip start. These
corrections may need to be float numbers, so start and offsets must be
float as well.
Sound strips now use speed factor instead of pitch. This means, that
strips will change length to match usable length. In addition, it is
possible to group movie and sound strip and change speed of meta strip.
Diffstat (limited to 'source/blender/makesdna/DNA_sequence_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_sequence_types.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index db24a775edb..a46d737ba9d 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -151,17 +151,17 @@ typedef struct Sequence { * Start frame of contents of strip in absolute frame coordinates. * For metastrips start of first strip startdisp. */ - int start; + float start; /** * Frames after the first frame where display starts, * frames before the last frame where display ends. */ - int startofs, endofs; + float startofs, endofs; /** * Frames that use the first frame before data begins, * frames that use the last frame after data ends. */ - int startstill, endstill; + float startstill, endstill; /** Machine: the strip channel */ int machine; int _pad3; @@ -213,7 +213,7 @@ typedef struct Sequence { float volume; /** Pitch (-0.1..10), pan -2..2. */ - float pitch, pan; + float pitch DNA_DEPRECATED, pan; float strobe; /** Struct pointer for effect settings. */ @@ -249,6 +249,11 @@ typedef struct Sequence { /* modifiers */ ListBase modifiers; + /* Playback rate of strip content in frames per second. */ + float media_playback_rate; + /* Multiply strip playback speed. */ + float speed_factor; + SequenceRuntime runtime; } Sequence; @@ -563,7 +568,7 @@ enum { SEQ_LOCK = (1 << 14), SEQ_USE_PROXY = (1 << 15), SEQ_IGNORE_CHANNEL_LOCK = (1 << 16), - SEQ_FLAG_UNUSED_22 = (1 << 17), /* cleared */ + SEQ_AUTO_PLAYBACK_RATE = (1 << 17), SEQ_FLAG_UNUSED_18 = (1 << 18), /* cleared */ SEQ_FLAG_UNUSED_19 = (1 << 19), /* cleared */ SEQ_FLAG_UNUSED_21 = (1 << 21), /* cleared */ |