timeline: heavily optimized and improved nearly all timeline optimizations
Features a lot of timeline-related cache optimizations as well as general optimizations and improvements in timeline behavior. Should improve usability significantly.
This commit is contained in:
@@ -62,7 +62,7 @@ NodeInput *ClipBlock::texture_input() const
|
||||
void ClipBlock::InvalidateCache(const TimeRange &range, NodeInput *from, NodeInput *source)
|
||||
{
|
||||
// If signal is from texture input, transform all times from media time to sequence time
|
||||
if (from == texture_input_) {
|
||||
if (from == texture_input_ || from == media_in_input()) {
|
||||
rational start = MediaToSequenceTime(range.in());
|
||||
rational end = MediaToSequenceTime(range.out());
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef CLIPBLOCK_H
|
||||
#define CLIPBLOCK_H
|
||||
|
||||
#include "audio/audiovisualwaveform.h"
|
||||
#include "node/block/block.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
@@ -56,12 +57,26 @@ public:
|
||||
|
||||
virtual void Hash(QCryptographicHash &hash, const rational &time) const override;
|
||||
|
||||
AudioVisualWaveform& waveform()
|
||||
{
|
||||
return waveform_;
|
||||
}
|
||||
|
||||
void set_waveform(const AudioVisualWaveform& wave)
|
||||
{
|
||||
waveform_ = wave;
|
||||
|
||||
emit PreviewUpdated();
|
||||
}
|
||||
|
||||
signals:
|
||||
void PreviewUpdated();
|
||||
|
||||
private:
|
||||
NodeInput* texture_input_;
|
||||
|
||||
AudioVisualWaveform waveform_;
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -318,8 +318,8 @@ NodeValueTable MathNode::Value(NodeValueDatabase &value) const
|
||||
SampleBufferPtr samples_a = val_a.data().value<SampleBufferPtr>();
|
||||
SampleBufferPtr samples_b = val_b.data().value<SampleBufferPtr>();
|
||||
|
||||
int max_samples = qMax(samples_a->sample_count_per_channel(), samples_b->sample_count_per_channel());
|
||||
int min_samples = qMin(samples_a->sample_count_per_channel(), samples_b->sample_count_per_channel());
|
||||
int max_samples = qMax(samples_a->sample_count(), samples_b->sample_count());
|
||||
int min_samples = qMin(samples_a->sample_count(), samples_b->sample_count());
|
||||
|
||||
SampleBufferPtr mixed_samples = SampleBuffer::CreateAllocated(samples_a->audio_params(), max_samples);
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#ifndef TRACKOUTPUT_H
|
||||
#define TRACKOUTPUT_H
|
||||
|
||||
#include "common/timelinecommon.h"
|
||||
#include "node/block/block.h"
|
||||
#include "timeline/timelinecommon.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "common/timelinecommon.h"
|
||||
#include "node/graph.h"
|
||||
#include "node/output/track/track.h"
|
||||
#include "timeline/timelinecommon.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
#include "common/timelinecommon.h"
|
||||
#include "node/block/block.h"
|
||||
#include "node/output/track/track.h"
|
||||
#include "node/output/track/tracklist.h"
|
||||
@@ -32,6 +31,7 @@
|
||||
#include "render/audioplaybackcache.h"
|
||||
#include "render/framehashcache.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "timeline/timelinecommon.h"
|
||||
#include "timeline/trackreference.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
Reference in New Issue
Block a user