Merge branch 'master' into cache-update
This commit is contained in:
@@ -38,7 +38,7 @@ TrackList::TrackList(Sequence *parent, const Track::Type &type, const QString &t
|
||||
|
||||
Track *TrackList::GetTrackAt(int index) const
|
||||
{
|
||||
if (index < track_cache_.size()) {
|
||||
if (index >= 0 && index < track_cache_.size()) {
|
||||
return track_cache_.at(index);
|
||||
} else {
|
||||
return nullptr;
|
||||
|
||||
@@ -398,6 +398,20 @@ void ViewerOutput::ConnectedToPreviewEvent()
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef VIEWER_H
|
||||
#define VIEWER_H
|
||||
|
||||
#include "codec/encoder.h"
|
||||
#include "common/rational.h"
|
||||
#include "node/node.h"
|
||||
#include "node/output/track/track.h"
|
||||
@@ -126,7 +127,7 @@ public:
|
||||
return InputArraySize(kSubtitleParamsInput);
|
||||
}
|
||||
|
||||
int GetTotalStreamCount() const
|
||||
virtual int GetTotalStreamCount() const
|
||||
{
|
||||
return GetVideoStreamCount() + GetAudioStreamCount() + GetSubtitleStreamCount();
|
||||
}
|
||||
@@ -186,6 +187,11 @@ public:
|
||||
bool IsVideoAutoCacheEnabled() const { qDebug() << "sequence ac is a stub"; return false; }
|
||||
void SetVideoAutoCacheEnabled(bool e) { qDebug() << "sequence ac is a stub"; }
|
||||
|
||||
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
|
||||
|
||||
const EncodingParams &GetLastUsedEncodingParams() const { return last_used_encoding_params_; }
|
||||
void SetLastUsedEncodingParams(const EncodingParams &p) { last_used_encoding_params_ = p; }
|
||||
|
||||
static const QString kVideoParamsInput;
|
||||
static const QString kAudioParamsInput;
|
||||
static const QString kSubtitleParamsInput;
|
||||
@@ -243,6 +249,8 @@ private:
|
||||
bool autocache_input_video_;
|
||||
bool autocache_input_audio_;
|
||||
|
||||
EncodingParams last_used_encoding_params_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user