began merging footage and viewer
This commit is contained in:
@@ -354,4 +354,22 @@ void ViewerOutput::set_parameters_from_footage(const QVector<Footage *> footage)
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewerOutput::LoadCustom(QXmlStreamReader *reader, XMLNodeData &xml_node_data, uint version, const QAtomicInt *cancelled)
|
||||
{
|
||||
if (reader->name() == QStringLiteral("points")) {
|
||||
timeline_points_.Load(reader);
|
||||
return true;
|
||||
} else {
|
||||
return LoadCustom(reader, xml_node_data, version, cancelled);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerOutput::SaveCustom(QXmlStreamWriter *writer) const
|
||||
{
|
||||
// Write TimelinePoints
|
||||
writer->writeStartElement(QStringLiteral("points"));
|
||||
timeline_points_.Save(writer);
|
||||
writer->writeEndElement(); // points
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,15 +24,17 @@
|
||||
#include "common/rational.h"
|
||||
#include "node/node.h"
|
||||
#include "node/output/track/track.h"
|
||||
#include "project/item/footage/footage.h"
|
||||
#include "render/audioparams.h"
|
||||
#include "render/audioplaybackcache.h"
|
||||
#include "render/framehashcache.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "timeline/timelinepoints.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class Footage;
|
||||
|
||||
/**
|
||||
* @brief A bridge between a node system and a ViewerPanel
|
||||
*
|
||||
@@ -97,6 +99,11 @@ public:
|
||||
return &audio_playback_cache_;
|
||||
}
|
||||
|
||||
TimelinePoints* GetTimelinePoints()
|
||||
{
|
||||
return &timeline_points_;
|
||||
}
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
virtual void BeginOperation() override;
|
||||
@@ -143,6 +150,10 @@ protected:
|
||||
|
||||
virtual void InputValueChangedEvent(const QString& input, int element) override;
|
||||
|
||||
virtual bool LoadCustom(QXmlStreamReader* reader, XMLNodeData &xml_node_data, uint version, const QAtomicInt* cancelled) override;
|
||||
|
||||
virtual void SaveCustom(QXmlStreamWriter *writer) const override;
|
||||
|
||||
private:
|
||||
rational last_length_;
|
||||
|
||||
@@ -154,6 +165,8 @@ private:
|
||||
|
||||
VideoParams cached_video_params_;
|
||||
|
||||
TimelinePoints timeline_points_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user