use uuid for identifying viewers
To aid generating a cache ID, each viewer node needs a UUID. Previous iterations tried to hash a name and time, but a UUID is a much more efficient way to do this.
This commit is contained in:
@@ -33,6 +33,9 @@ ViewerOutput::ViewerOutput()
|
||||
length_input_ = new NodeInput("length_in");
|
||||
length_input_->set_data_type(NodeInput::kRational);
|
||||
AddInput(length_input_);
|
||||
|
||||
// Create UUID for this node
|
||||
uuid_ = QUuid::createUuid();
|
||||
}
|
||||
|
||||
Node *ViewerOutput::copy() const
|
||||
@@ -125,6 +128,11 @@ rational ViewerOutput::Length()
|
||||
return 0;
|
||||
}
|
||||
|
||||
const QUuid &ViewerOutput::uuid() const
|
||||
{
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
void ViewerOutput::DependentEdgeChanged(NodeInput *from)
|
||||
{
|
||||
if (from == texture_input_) {
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#ifndef VIEWER_H
|
||||
#define VIEWER_H
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
#include "node/node.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "render/audioparams.h"
|
||||
@@ -57,6 +59,8 @@ public:
|
||||
|
||||
rational Length();
|
||||
|
||||
const QUuid& uuid() const;
|
||||
|
||||
protected:
|
||||
virtual void DependentEdgeChanged(NodeInput* from) override;
|
||||
|
||||
@@ -76,14 +80,14 @@ signals:
|
||||
void SizeChanged(int width, int height);
|
||||
|
||||
private:
|
||||
QUuid uuid_;
|
||||
|
||||
NodeInput* texture_input_;
|
||||
|
||||
NodeInput* samples_input_;
|
||||
|
||||
NodeInput* length_input_;
|
||||
|
||||
rational timebase_;
|
||||
|
||||
VideoParams video_params_;
|
||||
|
||||
AudioParams audio_params_;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "exporter.h"
|
||||
|
||||
Exporter::Exporter()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef EXPORTER_H
|
||||
#define EXPORTER_H
|
||||
|
||||
|
||||
class Exporter
|
||||
{
|
||||
public:
|
||||
Exporter();
|
||||
};
|
||||
|
||||
#endif // EXPORTER_H
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "openglexporter.h"
|
||||
|
||||
OpenGLExporter::OpenGLExporter()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef OPENGLEXPORTER_H
|
||||
#define OPENGLEXPORTER_H
|
||||
|
||||
|
||||
class OpenGLExporter
|
||||
{
|
||||
public:
|
||||
OpenGLExporter();
|
||||
};
|
||||
|
||||
#endif // OPENGLEXPORTER_H
|
||||
Reference in New Issue
Block a user