diff options
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index d18a71d3c55..0790896da0d 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -523,31 +523,12 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq, } -void calc_sequence_disp(Scene *scene, Sequence *seq) -{ - if(seq->startofs && seq->startstill) seq->startstill= 0; - if(seq->endofs && seq->endstill) seq->endstill= 0; - - seq->startdisp= seq->start + seq->startofs - seq->startstill; - seq->enddisp= seq->start+seq->len - seq->endofs + seq->endstill; - - seq->handsize= 10.0; /* 10 frames */ - if( seq->enddisp-seq->startdisp < 10 ) { - seq->handsize= (float)(0.5*(seq->enddisp-seq->startdisp)); - } - else if(seq->enddisp-seq->startdisp > 250) { - seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); - } - - seq_update_sound_bounds(scene, seq); -} - static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) { Sequence *seq; /* for sound we go over full meta tree to update bounds of the sound strips, - since sound is played outside of evaluating the imbufs, */ + * since sound is played outside of evaluating the imbufs, */ for(seq=metaseq->seqbase.first; seq; seq=seq->next) { if(seq->type == SEQ_META) { seq_update_sound_bounds_recursive(scene, seq); @@ -567,6 +548,29 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) } } +void calc_sequence_disp(Scene *scene, Sequence *seq) +{ + if(seq->startofs && seq->startstill) seq->startstill= 0; + if(seq->endofs && seq->endstill) seq->endstill= 0; + + seq->startdisp= seq->start + seq->startofs - seq->startstill; + seq->enddisp= seq->start+seq->len - seq->endofs + seq->endstill; + + seq->handsize= 10.0; /* 10 frames */ + if( seq->enddisp-seq->startdisp < 10 ) { + seq->handsize= (float)(0.5*(seq->enddisp-seq->startdisp)); + } + else if(seq->enddisp-seq->startdisp > 250) { + seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); + } + + if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + seq_update_sound_bounds(scene, seq); + } + else if(seq->type == SEQ_META) + seq_update_sound_bounds_recursive(scene, seq); +} + void calc_sequence(Scene *scene, Sequence *seq) { Sequence *seqm; @@ -2576,8 +2580,8 @@ static void seq_stop_threads() seq_thread_shutdown = TRUE; - pthread_cond_broadcast(&wakeup_cond); - pthread_mutex_unlock(&wakeup_lock); + pthread_cond_broadcast(&wakeup_cond); + pthread_mutex_unlock(&wakeup_lock); for(tslot = running_threads.first; tslot; tslot= tslot->next) { pthread_join(tslot->pthread, NULL); |