From 37fad2748477189c416df9eba78e339c604d1480 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Mon, 4 Jul 2022 09:53:46 -0500 Subject: [PATCH] viewer: repush buffers Fixes nested sequences --- app/node/output/viewer/viewer.cpp | 14 ++++++++++++++ app/node/output/viewer/viewer.h | 2 ++ app/node/value.h | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/app/node/output/viewer/viewer.cpp b/app/node/output/viewer/viewer.cpp index b505a8354..11f6142e2 100644 --- a/app/node/output/viewer/viewer.cpp +++ b/app/node/output/viewer/viewer.cpp @@ -376,6 +376,20 @@ Node::ValueHint ViewerOutput::GetConnectedSampleValueHint() return GetValueHintForInput(kSamplesInput); } +void ViewerOutput::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const +{ + if (HasInputWithID(kTextureInput)) { + NodeValue repush = value[kTextureInput]; + repush.set_tag(Track::Reference(Track::kVideo, 0).ToString()); + table->Push(repush); + } + if (HasInputWithID(kSamplesInput)) { + NodeValue repush = value[kSamplesInput]; + repush.set_tag(Track::Reference(Track::kAudio, 0).ToString()); + table->Push(value[kSamplesInput]); + } +} + void ViewerOutput::InputValueChangedEvent(const QString &input, int element) { if (element == 0) { diff --git a/app/node/output/viewer/viewer.h b/app/node/output/viewer/viewer.h index bc30cbc8a..09b0ac3d5 100644 --- a/app/node/output/viewer/viewer.h +++ b/app/node/output/viewer/viewer.h @@ -162,6 +162,8 @@ public: virtual ValueHint GetConnectedSampleValueHint(); + virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override; + static const QString kVideoParamsInput; static const QString kAudioParamsInput; static const QString kSubtitleParamsInput; diff --git a/app/node/value.h b/app/node/value.h index 6cf1e537d..88db6ebf0 100644 --- a/app/node/value.h +++ b/app/node/value.h @@ -236,6 +236,11 @@ public: return tag_; } + void set_tag(const QString& tag) + { + tag_ = tag; + } + const Node* source() const { return from_;