renderer: improved code flow
This commit is contained in:
@@ -27,12 +27,13 @@
|
||||
|
||||
#include "codec/frame.h"
|
||||
#include "codec/samplebuffer.h"
|
||||
#include "common/cancelableobject.h"
|
||||
#include "common/timerange.h"
|
||||
#include "node/output/viewer/viewer.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class RenderTicket : public QObject
|
||||
class RenderTicket : public QObject, public CancelableObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -88,6 +88,13 @@ bool RenderTicketWatcher::HasResult()
|
||||
}
|
||||
}
|
||||
|
||||
void RenderTicketWatcher::Cancel()
|
||||
{
|
||||
if (ticket_) {
|
||||
ticket_->Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void RenderTicketWatcher::TicketFinished()
|
||||
{
|
||||
emit Finished(this);
|
||||
|
||||
@@ -46,6 +46,8 @@ public:
|
||||
|
||||
bool HasResult();
|
||||
|
||||
void Cancel();
|
||||
|
||||
signals:
|
||||
void Finished(RenderTicketWatcher* watcher);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user