18 #ifndef MLTXMLCHECKER_H
19 #define MLTXMLCHECKER_H
21 #include <QXmlStreamReader>
22 #include <QXmlStreamWriter>
23 #include <QTemporaryFile>
26 #include <QStandardItemModel>
37 ShotcutHashRole = Qt::UserRole + 1
47 bool check(
const QString& fileName);
48 QString errorString()
const;
49 bool needsGPU()
const {
return m_needsGPU; }
50 bool needsCPU()
const {
return m_needsCPU; }
51 bool hasEffects()
const {
return m_hasEffects; }
52 bool isCorrected()
const {
return m_isCorrected; }
53 bool isUpdated()
const {
return m_isUpdated; }
54 QString tempFileName()
const {
return m_tempFile->fileName(); }
55 QStandardItemModel& unlinkedFilesModel() {
return m_unlinkedFilesModel; }
57 bool usesLocale()
const {
return m_usesLocale; }
60 typedef QPair<QString, QString> MltProperty;
63 void processProperties();
64 void checkInAndOutPoints();
65 bool checkNumericString(QString& value);
66 bool fixWebVfxPath(QString& resource);
67 bool readResourceProperty(
const QString& name, QString& value);
68 void checkGpuEffects(
const QString& mlt_service);
69 void checkCpuEffects(
const QString& mlt_service);
70 void checkUnlinkedFile(
const QString& mlt_service);
71 bool fixUnlinkedFile(QString& value);
72 void fixStreamIndex(MltProperty& property);
73 bool fixVersion1701WindowsPathBug(QString& value);
74 void checkIncludesSelf(QVector<MltProperty>& properties);
75 void checkLumaAlphaOver(
const QString& mlt_service, QVector<MltProperty>& properties);
76 void replaceWebVfxCropFilters(QString& mlt_service, QVector<MltProperty>& properties);
77 void replaceWebVfxChoppyFilter(QString& mlt_service, QVector<MltProperty>& properties);
78 void checkForProxy(
const QString& mlt_service, QVector<MltProperty>& properties);
80 QXmlStreamReader m_xml;
81 QXmlStreamWriter m_newXml;
89 QScopedPointer<QTemporaryFile> m_tempFile;
90 bool m_numericValueChanged;
92 QStandardItemModel m_unlinkedFilesModel;
94 QVector<MltProperty> m_properties;
95 struct MltXmlResource {
101 int audio_index, video_index;
104 info.setFile(QString());
109 audio_index = video_index = -1;
114 #endif // MLTXMLCHECKER_H