18#ifndef MLTXMLCHECKER_H
19#define MLTXMLCHECKER_H
21#include <QXmlStreamReader>
22#include <QXmlStreamWriter>
23#include <QTemporaryFile>
26#include <QStandardItemModel>
29#include <QVersionNumber>
38 ShotcutHashRole = Qt::UserRole + 1
48 QXmlStreamReader::Error check(
const QString &fileName);
49 QString errorString()
const;
58 bool hasEffects()
const
62 bool isCorrected()
const
66 bool isUpdated()
const
70 QTemporaryFile &tempFile()
const
74 QStandardItemModel &unlinkedFilesModel()
76 return m_unlinkedFilesModel;
78 QString shotcutVersion()
const
80 return m_shotcutVersion;
84 typedef QPair<QString, QString> MltProperty;
87 void processProperties();
88 void checkInAndOutPoints();
89 bool checkNumericString(QString &value);
90 bool fixWebVfxPath(QString &resource);
91 bool readResourceProperty(
const QString &name, QString &value);
92 void checkGpuEffects(
const QString &mlt_service);
93 void checkCpuEffects(
const QString &mlt_service);
94 void checkUnlinkedFile(
const QString &mlt_service);
95 bool fixUnlinkedFile(QString &value);
96 void fixStreamIndex(MltProperty &property);
97 bool fixVersion1701WindowsPathBug(QString &value);
98 void checkIncludesSelf(QVector<MltProperty> &properties);
99 void checkLumaAlphaOver(
const QString &mlt_service, QVector<MltProperty> &properties);
100 void replaceWebVfxCropFilters(QString &mlt_service, QVector<MltProperty> &properties);
101 void replaceWebVfxChoppyFilter(QString &mlt_service, QVector<MltProperty> &properties);
102 void checkForProxy(
const QString &mlt_service, QVector<MltProperty> &properties);
103 bool checkMltVersion();
105 QXmlStreamReader m_xml;
106 QXmlStreamWriter m_newXml;
112 QChar m_decimalPoint;
113 QScopedPointer<QTemporaryFile> m_tempFile;
114 bool m_numericValueChanged;
115 QFileInfo m_fileInfo;
116 QStandardItemModel m_unlinkedFilesModel;
118 QVector<MltProperty> m_properties;
119 struct MltXmlResource {
126 int audio_index, video_index;
132 info.setFile(QString());
138 audio_index = video_index = -1;
140 notProxyMeta =
false;
143 QVersionNumber m_mltVersion;
144 QString m_shotcutVersion;