completed prototype of background service that traverse the graph

This commit is contained in:
itsmattkc
2019-08-25 13:51:47 +10:00
parent 438e7081f9
commit 09a6a5a12a
16 changed files with 396 additions and 59 deletions
+7 -9
View File
@@ -28,21 +28,18 @@
#include "node/node.h"
#include "render/renderinstance.h"
struct RenderQueueEntry {
Node* node;
rational time;
};
#include "renderpath.h"
class RendererThread : public QThread
{
Q_OBJECT
public:
RendererThread(const int& width,
const int& height,
const olive::PixelFormat& format,
const olive::RenderMode& mode);
bool Queue(Node* n, const rational &time);
void Queue(const RenderThreadPath& path, const rational &time);
void Cancel();
@@ -52,6 +49,9 @@ public:
void StartThread(Priority priority = InheritPriority);
signals:
void FinishedPath();
private:
QWaitCondition wait_cond_;
@@ -59,7 +59,7 @@ private:
QMutex caller_mutex_;
Node* node_;
RenderThreadPath path_;
rational time_;
@@ -75,8 +75,6 @@ private:
RenderInstance* render_instance_;
QVector<RenderQueueEntry> queue_;
};
using RendererThreadPtr = std::shared_ptr<RendererThread>;