Files
oak-editor/app/render/backend/renderworker.h
T
itsmattkc 7a6dd02e5b furthered development of audio renderers
Mostly reimplementing functions from other workers to produce audio samples
2019-11-11 11:35:01 +09:00

56 lines
979 B
C++

#ifndef RENDERWORKER_H
#define RENDERWORKER_H
#include <QObject>
#include "node/node.h"
#include "decodercache.h"
class RenderWorker : public QObject
{
Q_OBJECT
public:
RenderWorker(DecoderCache* decoder_cache, QObject* parent = nullptr);
Q_DISABLE_COPY_MOVE(RenderWorker)
bool Init();
bool IsStarted();
bool IsAvailable();
public slots:
void Close();
void Render(NodeDependency path);
virtual void RenderAsSibling(NodeDependency dep) = 0;
protected:
Node* ValidateBlock(Node* n, const rational& time);
virtual bool InitInternal() = 0;
virtual void CloseInternal() = 0;
virtual void RenderInternal(const NodeDependency& path);
StreamPtr ResolveStreamFromInput(NodeInput* input);
DecoderPtr ResolveDecoderFromInput(NodeInput* input);
QList<Node*> ListNodeAndAllDependencies(Node* n);
DecoderCache* decoder_cache();
QAtomicInt working_;
private:
bool started_;
DecoderCache* decoder_cache_;
};
#endif // RENDERWORKER_H