use QVector instead of QList for block cache

This commit is contained in:
itsmattkc
2021-01-09 10:41:13 +11:00
parent 441a459774
commit 3337be07e5
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -225,9 +225,9 @@ Block *TrackOutput::BlockAtTime(const rational &time) const
return nullptr;
}
QList<Block *> TrackOutput::BlocksAtTimeRange(const TimeRange &range) const
QVector<Block *> TrackOutput::BlocksAtTimeRange(const TimeRange &range) const
{
QList<Block*> list;
QVector<Block*> list;
if (IsMuted()) {
return list;
+3 -3
View File
@@ -148,9 +148,9 @@ public:
* `block.in < range.out && block.out > range.in`. Returns an empty list if IsMuted() or if
* `range.in >= track.length`. Blocks that are not enabled will be omitted from the returned list.
*/
QList<Block*> BlocksAtTimeRange(const TimeRange& range) const;
QVector<Block*> BlocksAtTimeRange(const TimeRange& range) const;
const QList<Block *> &Blocks() const
const QVector<Block *> &Blocks() const
{
return block_cache_;
}
@@ -276,7 +276,7 @@ private:
void SetLengthInternal(const rational& r, bool invalidate = true);
QList<Block*> block_cache_;
QVector<Block*> block_cache_;
NodeInput* block_input_;
+1 -1
View File
@@ -192,7 +192,7 @@ NodeValueTable RenderProcessor::GenerateBlockTable(const TrackOutput *track, con
const AudioParams& audio_params = ticket_->property("aparam").value<AudioParams>();
QList<Block*> active_blocks = track->BlocksAtTimeRange(range);
QVector<Block*> active_blocks = track->BlocksAtTimeRange(range);
// All these blocks will need to output to a buffer so we create one here
SampleBufferPtr block_range_buffer = SampleBuffer::CreateAllocated(audio_params,
@@ -550,7 +550,7 @@ QVector<MediaInput *> ProjectExplorer::GetMediaNodesUsingFootage(Footage *item)
// Footage can contain multiple streams, all of which need to be dealt with
foreach (Item* s, sequences) {
const QList<Node*>& nodes = static_cast<Sequence*>(s)->nodes();
const QVector<Node*>& nodes = static_cast<Sequence*>(s)->nodes();
foreach (Node* n, nodes) {
MediaInput* media_node = dynamic_cast<MediaInput*>(n);