more work towards loading media into the node graph

This commit is contained in:
itsmattkc
2019-08-06 08:26:25 +10:00
parent cee2b617a1
commit 360328ccbb
7 changed files with 26 additions and 15 deletions
+10 -1
View File
@@ -20,6 +20,8 @@
#include "clip.h"
#include <QDebug>
ClipBlock::ClipBlock()
{
texture_input_ = new NodeInput();
@@ -59,11 +61,18 @@ NodeInput *ClipBlock::texture_input()
void ClipBlock::Process(const rational &time)
{
qDebug() << "Clip received time" << time.numerator() << "/" << time.denominator();
// Run default node processing
Block::Process(time);
// We convert the time given (timeline time) to media time
rational media_time = time - in() + media_in_;
// rational media_time = time - in() + media_in_;
rational media_time = time - in();
qDebug() << "In time" << in().numerator() << "/" << in().denominator();
qDebug() << "Media In time" << media_in_.numerator() << "/" << media_in_.denominator();
qDebug() << "Media sent time" << media_time.numerator() << "/" << media_time.denominator();
// Retrieve texture
texture_output()->set_value(texture_input_->get_value(media_time));