various changes to rendering flow and structure
This commit is contained in:
@@ -131,7 +131,7 @@ QList<NodeDependency> TrackOutput::RunDependencies(NodeOutput* output, const rat
|
||||
ValidateCurrentBlock(time);
|
||||
|
||||
if (current_block_ != this) {
|
||||
deps.append(NodeDependency(current_block_->texture_output(), time));
|
||||
deps.append(NodeDependency(current_block_->texture_output(), time, time));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "viewer.h"
|
||||
|
||||
ViewerOutput::ViewerOutput() :
|
||||
viewer_width_(0),
|
||||
viewer_height_(0)
|
||||
ViewerOutput::ViewerOutput()
|
||||
{
|
||||
texture_input_ = new NodeInput("tex_in");
|
||||
texture_input_->add_data_input(NodeInput::kTexture);
|
||||
@@ -57,18 +55,6 @@ QString ViewerOutput::Description()
|
||||
return tr("Interface between a Viewer panel and the node system.");
|
||||
}
|
||||
|
||||
const rational &ViewerOutput::Timebase()
|
||||
{
|
||||
return timebase_;
|
||||
}
|
||||
|
||||
void ViewerOutput::SetTimebase(const rational &timebase)
|
||||
{
|
||||
timebase_ = timebase;
|
||||
|
||||
emit TimebaseChanged(timebase_);
|
||||
}
|
||||
|
||||
NodeInput *ViewerOutput::texture_input()
|
||||
{
|
||||
return texture_input_;
|
||||
@@ -103,22 +89,27 @@ void ViewerOutput::InvalidateCache(const rational &start_range, const rational &
|
||||
SendInvalidateCache(start_range, end_range);
|
||||
}
|
||||
|
||||
void ViewerOutput::SetViewerSize(const int &width, const int &height)
|
||||
const VideoParams &ViewerOutput::video_params()
|
||||
{
|
||||
viewer_width_ = width;
|
||||
viewer_height_ = height;
|
||||
|
||||
emit SizeChanged(viewer_width_, viewer_height_);
|
||||
return video_params_;
|
||||
}
|
||||
|
||||
const int &ViewerOutput::ViewerWidth()
|
||||
const AudioParams &ViewerOutput::audio_params()
|
||||
{
|
||||
return viewer_width_;
|
||||
return audio_params_;
|
||||
}
|
||||
|
||||
const int &ViewerOutput::ViewerHeight()
|
||||
void ViewerOutput::set_video_params(const VideoParams &video)
|
||||
{
|
||||
return viewer_height_;
|
||||
video_params_ = video;
|
||||
|
||||
emit SizeChanged(video_params_.width(), video_params_.height());
|
||||
emit TimebaseChanged(video_params_.time_base());
|
||||
}
|
||||
|
||||
void ViewerOutput::set_audio_params(const AudioParams &audio)
|
||||
{
|
||||
audio_params_ = audio;
|
||||
}
|
||||
|
||||
rational ViewerOutput::Length()
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#define VIEWER_H
|
||||
|
||||
#include "node/node.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "render/audio/audioparams.h"
|
||||
#include "render/rendertexture.h"
|
||||
|
||||
/**
|
||||
@@ -40,9 +42,6 @@ public:
|
||||
virtual QString Category() override;
|
||||
virtual QString Description() override;
|
||||
|
||||
const rational& Timebase();
|
||||
void SetTimebase(const rational& timebase);
|
||||
|
||||
NodeInput* texture_input();
|
||||
NodeInput* samples_input();
|
||||
NodeInput* length_input();
|
||||
@@ -52,10 +51,11 @@ public:
|
||||
|
||||
virtual void InvalidateCache(const rational &start_range, const rational &end_range, NodeInput *from = nullptr) override;
|
||||
|
||||
void SetViewerSize(const int& width, const int& height);
|
||||
const VideoParams& video_params();
|
||||
const AudioParams& audio_params();
|
||||
|
||||
const int& ViewerWidth();
|
||||
const int& ViewerHeight();
|
||||
void set_video_params(const VideoParams& video);
|
||||
void set_audio_params(const AudioParams& audio);
|
||||
|
||||
rational Length();
|
||||
|
||||
@@ -78,9 +78,9 @@ private:
|
||||
|
||||
rational timebase_;
|
||||
|
||||
int viewer_width_;
|
||||
VideoParams video_params_;
|
||||
|
||||
int viewer_height_;
|
||||
AudioParams audio_params_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user