implement entire project in nodes
Project items are now represented directly in nodes opening up more versatility and possibilities. This is the first iteration of this and will be buggy. Need to test thoroughly.
This commit is contained in:
@@ -24,27 +24,31 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
PreCacheTask::PreCacheTask(VideoStream *footage, Sequence* sequence) :
|
||||
RenderTask(new ViewerOutput(), sequence->video_params(), sequence->audio_params()),
|
||||
footage_(footage)
|
||||
PreCacheTask::PreCacheTask(Footage *footage, int index, Sequence* sequence) :
|
||||
RenderTask(new ViewerOutput(), sequence->video_params(), sequence->audio_params())
|
||||
{
|
||||
viewer()->set_video_params(sequence->video_params());
|
||||
viewer()->set_audio_params(sequence->audio_params());
|
||||
|
||||
video_node_ = new MediaInput();
|
||||
video_node_->SetStream(footage);
|
||||
// FIXME: I've been lazy and haven't included support for anything connected to a footage input.
|
||||
// At the moment, footage nodes have no connectable inputs so it's not a problem, but if
|
||||
// they ever do, that needs to be addressed immediately.
|
||||
Q_ASSERT(footage->inputs().isEmpty());
|
||||
|
||||
Node::ConnectEdge(video_node_, NodeInput(viewer(), ViewerOutput::kTextureInput));
|
||||
// Copy footage node so it can precache without any modifications from the user screwing it up
|
||||
footage_ = static_cast<Footage*>(footage->copy());
|
||||
index_ = index;
|
||||
Node::CopyInputs(footage, footage_, false);
|
||||
|
||||
SetTitle(tr("Pre-caching %1:%2").arg(footage->footage()->filename(),
|
||||
QString::number(footage->index())));
|
||||
Node::ConnectEdge(footage_, NodeInput(viewer(), ViewerOutput::kTextureInput));
|
||||
|
||||
SetTitle(tr("Pre-caching %1:%2").arg(footage_->filename()));
|
||||
}
|
||||
|
||||
PreCacheTask::~PreCacheTask()
|
||||
{
|
||||
// We created this viewer node ourselves, so now we should delete it
|
||||
delete viewer();
|
||||
delete video_node_;
|
||||
}
|
||||
|
||||
bool PreCacheTask::Run()
|
||||
@@ -63,7 +67,7 @@ bool PreCacheTask::Run()
|
||||
}
|
||||
*/
|
||||
|
||||
Render(footage_->footage()->project()->color_manager(),
|
||||
Render(footage_->project()->color_manager(),
|
||||
video_range,
|
||||
TimeRangeList(),
|
||||
RenderMode::kOnline,
|
||||
|
||||
Reference in New Issue
Block a user