Merge branch 'master' into cache-update

This commit is contained in:
itsmattkc
2022-07-01 22:32:49 -05:00
98 changed files with 1638 additions and 1480 deletions
+3
View File
@@ -81,6 +81,9 @@ void TrackList::TrackConnected(Node *node, int element)
UpdateTrackIndexesFrom(cache_index);
connect(track, &Track::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
connect(track, &Track::TrackHeightChangedInPixels, this, [this](int height){
emit TrackHeightChanged(static_cast<Track*>(sender()), height);
});
track->set_type(type_);
track->set_sequence(parent());
+2
View File
@@ -101,6 +101,8 @@ signals:
void TrackRemoved(Track* track);
void TrackHeightChanged(Track *track, int height);
private:
void UpdateTrackIndexesFrom(int index);
+4 -3
View File
@@ -60,7 +60,8 @@ ViewerOutput::ViewerOutput(bool create_buffer_inputs, bool create_default_stream
SetFlags(kDontShowInParamView);
timeline_points_ = new TimelinePoints(this);
workarea_ = new TimelineWorkArea(this);
markers_ = new TimelineMarkerList(this);
}
QString ViewerOutput::Name() const
@@ -342,7 +343,7 @@ rational ViewerOutput::VerifyLengthInternal(Track::Type type) const
case Track::kVideo:
if (IsInputConnected(kTextureInput)) {
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kTextureInput), TimeRange(0, 0));
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).toRational();
if (!r.isNaN()) {
return r;
}
@@ -351,7 +352,7 @@ rational ViewerOutput::VerifyLengthInternal(Track::Type type) const
case Track::kAudio:
if (IsInputConnected(kSamplesInput)) {
NodeValueTable t = traverser.GenerateTable(GetConnectedOutput(kSamplesInput), TimeRange(0, 0));
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).value<rational>();;
rational r = t.Get(NodeValue::kRational, QStringLiteral("length")).toRational();
if (!r.isNaN()) {
return r;
}
+6 -6
View File
@@ -29,7 +29,8 @@
#include "render/framehashcache.h"
#include "render/subtitleparams.h"
#include "render/videoparams.h"
#include "timeline/timelinepoints.h"
#include "timeline/timelinemarker.h"
#include "timeline/timelineworkarea.h"
namespace olive {
@@ -151,10 +152,8 @@ public:
const rational &GetVideoLength() const { return video_length_; }
const rational &GetAudioLength() const { return audio_length_; }
TimelinePoints* GetTimelinePoints()
{
return timeline_points_;
}
TimelineWorkArea *GetWorkArea() const { return workarea_; }
TimelineMarkerList *GetMarkers() const { return markers_; }
virtual TimeRange GetVideoCacheRange() const override
{
@@ -238,7 +237,8 @@ private:
AudioParams cached_audio_params_;
TimelinePoints *timeline_points_;
TimelineWorkArea *workarea_;
TimelineMarkerList *markers_;
bool autocache_input_video_;
bool autocache_input_audio_;