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 bool check(
const QString& fileName);
49 QString errorString()
const;
50 bool needsGPU()
const {
return m_needsGPU; }
51 bool needsCPU()
const {
return m_needsCPU; }
52 bool hasEffects()
const {
return m_hasEffects; }
53 bool isCorrected()
const {
return m_isCorrected; }
54 bool isUpdated()
const {
return m_isUpdated; }
55 QTemporaryFile& tempFile()
const {
return *m_tempFile; }
56 QStandardItemModel& unlinkedFilesModel() {
return m_unlinkedFilesModel; }
58 bool usesLocale()
const {
return m_usesLocale; }
59 QString shotcutVersion()
const {
return m_shotcutVersion; }
62 typedef QPair<QString, QString> MltProperty;
65 void processProperties();
66 void checkInAndOutPoints();
67 bool checkNumericString(QString& value);
68 bool fixWebVfxPath(QString& resource);
69 bool readResourceProperty(
const QString& name, QString& value);
70 void checkGpuEffects(
const QString& mlt_service);
71 void checkCpuEffects(
const QString& mlt_service);
72 void checkUnlinkedFile(
const QString& mlt_service);
73 bool fixUnlinkedFile(QString& value);
74 void fixStreamIndex(MltProperty& property);
75 bool fixVersion1701WindowsPathBug(QString& value);
76 void checkIncludesSelf(QVector<MltProperty>& properties);
77 void checkLumaAlphaOver(
const QString& mlt_service, QVector<MltProperty>& properties);
78 void replaceWebVfxCropFilters(QString& mlt_service, QVector<MltProperty>& properties);
79 void replaceWebVfxChoppyFilter(QString& mlt_service, QVector<MltProperty>& properties);
80 void checkForProxy(
const QString& mlt_service, QVector<MltProperty>& properties);
81 bool checkMltVersion();
83 QXmlStreamReader m_xml;
84 QXmlStreamWriter m_newXml;
92 QScopedPointer<QTemporaryFile> m_tempFile;
93 bool m_numericValueChanged;
95 QStandardItemModel m_unlinkedFilesModel;
97 QVector<MltProperty> m_properties;
98 struct MltXmlResource {
104 int audio_index, video_index;
107 info.setFile(QString());
112 audio_index = video_index = -1;
115 QVersionNumber m_mltVersion;
116 QString m_shotcutVersion;
119 #endif // MLTXMLCHECKER_H