node: split off traversing functions from renderer for usage elsewhere

Fixes issue where Viewer node wouldn't pick up correct length if a tracks
weren't in use.
This commit is contained in:
itsmattkc
2020-03-13 15:31:15 +11:00
parent 41da5dbd53
commit 9e4c79699e
18 changed files with 218 additions and 142 deletions
+31
View File
@@ -0,0 +1,31 @@
#ifndef NODETRAVERSER_H
#define NODETRAVERSER_H
#include "codec/decoder.h"
#include "common/cancelableobject.h"
#include "dependency.h"
#include "node/output/track/track.h"
#include "project/item/footage/stream.h"
#include "value.h"
class NodeTraverser : public CancelableObject
{
public:
NodeTraverser();
NodeValueTable ProcessNode(const NodeDependency &dep);
protected:
NodeValueDatabase GenerateDatabase(const Node *node, const TimeRange &range);
virtual NodeValueTable RenderBlock(const TrackOutput *track, const TimeRange& range);
NodeValueTable ProcessInput(const NodeInput* input, const TimeRange &range);
virtual void InputProcessingEvent(NodeInput*, const TimeRange&, NodeValueTable*){}
virtual void ProcessNodeEvent(const Node*, const TimeRange&, const NodeValueDatabase&, NodeValueTable*){}
};
#endif // NODETRAVERSER_H