Save timeline2 document

parent ca0cc383
......@@ -68,7 +68,7 @@
#include <xlocale.h>
#endif
const double DOCUMENTVERSION = 0.95;
const double DOCUMENTVERSION = 0.96;
KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGroup *undoGroup, const QString &profileName, const QMap<QString, QString> &properties, const QMap<QString, QString> &metadata, const QPoint &tracks, Render *render, NotesPlugin *notes, bool *openBackup, MainWindow *parent) :
QObject(parent),
......
......@@ -1269,6 +1269,33 @@ void GLWidget::updateGamma()
reconfigure();
}
const QString GLWidget::sceneList(const QString &root)
{
QString playlist;
qCDebug(KDENLIVE_LOG) << " * * *Setting document xml root: " << root;
Mlt::Consumer xmlConsumer(*m_monitorProfile, "xml:kdenlive_playlist");
if (!root.isEmpty()) {
xmlConsumer.set("root", root.toUtf8().constData());
}
if (!xmlConsumer.is_valid()) {
return QString();
}
m_producer->optimise();
xmlConsumer.set("terminate_on_pause", 1);
xmlConsumer.set("store", "kdenlive");
// Disabling meta creates cleaner files, but then we don't have access to metadata on the fly (meta channels, etc)
// And we must use "avformat" instead of "avformat-novalidate" on project loading which causes a big delay on project opening
//xmlConsumer.set("no_meta", 1);
Mlt::Producer prod(m_producer->get_producer());
if (!prod.is_valid()) {
return QString();
}
xmlConsumer.connect(prod);
xmlConsumer.run();
playlist = QString::fromUtf8(xmlConsumer.get("kdenlive_playlist"));
return playlist;
}
void GLWidget::updateTexture(GLuint yName, GLuint uName, GLuint vName)
{
m_texture[0] = yName;
......
......@@ -67,6 +67,9 @@ public:
int reconfigureMulti(const QString &params, const QString &path, Mlt::Profile *profile);
void stopCapture();
int reconfigure(Mlt::Profile *profile = nullptr);
/** @brief Get the current MLT producer playlist.
* @return A string describing the playlist */
const QString sceneList(const QString &root);
int displayWidth() const
{
......
......@@ -1499,10 +1499,7 @@ void Monitor::resetProfile(const MltVideoProfile &profile)
const QString Monitor::sceneList(const QString &root)
{
if (render == nullptr) {
return QString();
}
return render->sceneList(root);
return m_glMonitor->sceneList(root);
}
void Monitor::setClipZone(const QPoint &pos)
......
......@@ -714,6 +714,8 @@ void ProjectManager::slotAutoSave()
QString ProjectManager::projectSceneList(const QString &outputFolder)
{
//TODO: re-implement overlay and all
return pCore->monitorManager()->projectMonitor()->sceneList(outputFolder);
bool multitrackEnabled = m_trackView->multitrackView;
if (multitrackEnabled) {
// Multitrack view was enabled, disable for auto save
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment