renderer: improve thread safety
Since we share render backends between the viewer and cache tasks now, we should ensure the render backend is thread safe.
This commit is contained in:
@@ -139,7 +139,7 @@ RenderTicketPtr RenderBackend::RenderFrame(const rational &time)
|
||||
|
||||
render_queue_.push_back(ticket);
|
||||
|
||||
RunNextJob();
|
||||
QMetaObject::invokeMethod(this, "RunNextJob", Qt::QueuedConnection);
|
||||
|
||||
return ticket;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ RenderTicketPtr RenderBackend::RenderAudio(const TimeRange &r)
|
||||
|
||||
render_queue_.push_back(ticket);
|
||||
|
||||
RunNextJob();
|
||||
QMetaObject::invokeMethod(this, "RunNextJob", Qt::QueuedConnection);
|
||||
|
||||
return ticket;
|
||||
}
|
||||
|
||||
@@ -115,8 +115,6 @@ private:
|
||||
Node *CopyNodeConnections(Node *src_node);
|
||||
void CopyNodeMakeConnection(NodeInput *src_input, NodeInput *dst_input);
|
||||
|
||||
void RunNextJob();
|
||||
|
||||
ViewerOutput* viewer_node_;
|
||||
|
||||
// VIDEO MEMBERS
|
||||
@@ -150,6 +148,8 @@ private:
|
||||
private slots:
|
||||
void WorkerFinished();
|
||||
|
||||
void RunNextJob();
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user