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;
79 bool usesLocale()
const
83 QString shotcutVersion()
const
85 return m_shotcutVersion;
89 typedef QPair<QString, QString> MltProperty;
92 void processProperties();
93 void checkInAndOutPoints();
94 bool checkNumericString(QString &value);
95 bool fixWebVfxPath(QString &resource);
96 bool readResourceProperty(
const QString &name, QString &value);
97 void checkGpuEffects(
const QString &mlt_service);
98 void checkCpuEffects(
const QString &mlt_service);
99 void checkUnlinkedFile(
const QString &mlt_service);
100 bool fixUnlinkedFile(QString &value);
101 void fixStreamIndex(MltProperty &property);
102 bool fixVersion1701WindowsPathBug(QString &value);
103 void checkIncludesSelf(QVector<MltProperty> &properties);
104 void checkLumaAlphaOver(
const QString &mlt_service, QVector<MltProperty> &properties);
105 void replaceWebVfxCropFilters(QString &mlt_service, QVector<MltProperty> &properties);
106 void replaceWebVfxChoppyFilter(QString &mlt_service, QVector<MltProperty> &properties);
107 void checkForProxy(
const QString &mlt_service, QVector<MltProperty> &properties);
108 bool checkMltVersion();
110 QXmlStreamReader m_xml;
111 QXmlStreamWriter m_newXml;
118 QChar m_decimalPoint;
119 QScopedPointer<QTemporaryFile> m_tempFile;
120 bool m_numericValueChanged;
121 QFileInfo m_fileInfo;
122 QStandardItemModel m_unlinkedFilesModel;
124 QVector<MltProperty> m_properties;
125 struct MltXmlResource {
132 int audio_index, video_index;
136 info.setFile(QString());
142 audio_index = video_index = -1;
145 QVersionNumber m_mltVersion;
146 QString m_shotcutVersion;