node: fixed issue with "taking" values from input tables

As opposed to simply leaving all values in the table, nodes can now "take"
values that they use to free up memory (e.g. "taking" input buffers if they're
used to produce an output buffer).

This is a fairly large change, expect regressions.
This commit is contained in:
itsmattkc
2020-04-16 23:12:05 +10:00
parent cc8699c0bc
commit 2f80be437a
30 changed files with 179 additions and 101 deletions
+2 -3
View File
@@ -100,16 +100,15 @@ TimeRange ClipBlock::OutputTimeAdjustment(NodeInput *input, const TimeRange &inp
return Block::InputTimeAdjustment(input, input_time);
}
NodeValueTable ClipBlock::Value(const NodeValueDatabase &value) const
NodeValueTable ClipBlock::Value(NodeValueDatabase &value) const
{
// We discard most values here except for the buffer we received
NodeValueTable table;
NodeValue data = value[texture_input()].GetWithMeta(NodeParam::kBuffer);
NodeValueTable table;
if (data.type() != NodeParam::kNone) {
table.Push(data);
}
return table;
}
+1 -1
View File
@@ -50,7 +50,7 @@ public:
virtual TimeRange OutputTimeAdjustment(NodeInput* input, const TimeRange& input_time) const override;
virtual NodeValueTable Value(const NodeValueDatabase& value) const override;
virtual NodeValueTable Value(NodeValueDatabase& value) const override;
virtual void Retranslate() override;