#include <mlt++/Mlt.h>
-const double DOCUMENTVERSION = 0.86;
+const double DOCUMENTVERSION = 0.87;
KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, const QPoint tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
QObject(parent),
// Creating new document
QDomDocument doc;
QDomElement mlt = doc.createElement("mlt");
+ mlt.setAttribute("LC_NUMERIC", "");
doc.appendChild(mlt);
// Create black producer
property = doc.createElement("property");
property.setAttribute("name", "aspect_ratio");
- value = doc.createTextNode(QString::number(0.0));
+ value = doc.createTextNode(QString::number(0));
property.appendChild(value);
blk.appendChild(property);
return sceneList;
}
+ // Set playlist audio volume to 100%
+ QDomElement tractor = mlt.firstChildElement("tractor");
+ if (!tractor.isNull()) {
+ QDomNodeList props = tractor.elementsByTagName("property");
+ for (int i = 0; i < props.count(); i++) {
+ if (props.at(i).toElement().attribute("name") == "meta.volume") {
+ props.at(i).firstChild().setNodeValue("1");
+ break;
+ }
+ }
+ }
+
QDomElement addedXml = sceneList.createElement("kdenlivedoc");
mlt.appendChild(addedXml);
void KdenliveDoc::setModified(bool mod)
{
+ if (isReadOnly()) return;
if (!m_url.isEmpty() && mod && KdenliveSettings::crashrecovery()) {
m_autoSaveTimer->start(3000);
}
}
}
+bool KdenliveDoc::isReadOnly() const
+{
+ return m_documentProperties.contains("readonly");
+}
+
void KdenliveDoc::cleanupBackupFiles()
{
KUrl backupFile = m_projectFolder;