Files
oak-editor/app/render/backend/renderworker.h
T
itsmattkc 26b3993b9d made vast improvements to rendering engine and node structure
This was many changes that were largely fundamentally related. They included:
- More const modifiers to enforce read only node graphs
- Support for fragment and vertex shaders from the nodes
- Support for node code loaded externally (embedded into the binary)
- Fixed issue preventing two textures from being used in a shader
- Removed several unused functions and cleaned up code
- Fixed video media node misreading its matrix input
2019-12-09 23:50:52 +11:00

61 lines
1.3 KiB
C++

#ifndef RENDERWORKER_H
#define RENDERWORKER_H
#include <QObject>
#include "common/constructors.h"
#include "node/output/track/track.h"
#include "node/node.h"
#include "decodercache.h"
class RenderWorker : public QObject
{
Q_OBJECT
public:
RenderWorker(QObject* parent = nullptr);
DISABLE_COPY_MOVE(RenderWorker)
bool Init();
bool IsStarted();
public slots:
void Close();
void Render(NodeDependency path);
signals:
void CompletedCache(NodeDependency dep, NodeValueTable data);
protected:
virtual bool InitInternal() = 0;
virtual void CloseInternal() = 0;
virtual NodeValueTable RenderInternal(const NodeDependency& path);
virtual bool OutputIsAccelerated(Node *output);
virtual void RunNodeAccelerated(const Node *node, const NodeValueDatabase *input_params, NodeValueTable* output_params);
StreamPtr ResolveStreamFromInput(NodeInput* input);
DecoderPtr ResolveDecoderFromInput(StreamPtr stream);
virtual FramePtr RetrieveFromDecoder(DecoderPtr decoder, const TimeRange& range) = 0;
virtual void FrameToValue(StreamPtr stream, FramePtr frame, NodeValueTable* table) = 0;
NodeValueTable ProcessNode(const NodeDependency &dep);
virtual NodeValueTable RenderBlock(const TrackOutput *track, const TimeRange& range) = 0;
private:
bool started_;
DecoderCache decoder_cache_;
};
#endif // RENDERWORKER_H