18#ifndef MLTXMLCHECKER_H
19#define MLTXMLCHECKER_H
23#include <QStandardItemModel>
25#include <QTemporaryFile>
27#include <QVersionNumber>
28#include <QXmlStreamReader>
29#include <QXmlStreamWriter>
36 enum { ShotcutHashRole = Qt::UserRole + 1 };
38 enum { MissingColumn = 0, ReplacementColumn, ColumnCount };
41 QXmlStreamReader::Error check(
const QString &fileName);
42 QString errorString()
const;
43 bool needsGPU()
const {
return m_needsGPU; }
44 bool needsCPU()
const {
return m_needsCPU; }
45 bool hasEffects()
const {
return m_hasEffects; }
46 bool isCorrected()
const {
return m_isCorrected; }
47 bool isUpdated()
const {
return m_isUpdated; }
48 QTemporaryFile &tempFile()
const {
return *m_tempFile; }
49 QStandardItemModel &unlinkedFilesModel() {
return m_unlinkedFilesModel; }
50 QString shotcutVersion()
const {
return m_shotcutVersion; }
53 typedef QPair<QString, QString> MltProperty;
56 void processProperties();
57 void checkInAndOutPoints();
58 bool checkNumericString(QString &value);
59 bool fixWebVfxPath(QString &resource);
60 bool readResourceProperty(
const QString &name, QString &value);
61 void checkGpuEffects(
const QString &mlt_service);
62 void checkCpuEffects(
const QString &mlt_service);
63 void checkUnlinkedFile(
const QString &mlt_service);
64 bool fixUnlinkedFile(QString &value);
65 void fixStreamIndex(MltProperty &property);
66 bool fixVersion1701WindowsPathBug(QString &value);
67 void checkIncludesSelf(QVector<MltProperty> &properties);
68 void checkLumaAlphaOver(
const QString &mlt_service, QVector<MltProperty> &properties);
69 void replaceWebVfxCropFilters(QString &mlt_service, QVector<MltProperty> &properties);
70 void replaceWebVfxChoppyFilter(QString &mlt_service, QVector<MltProperty> &properties);
71 void checkForProxy(
const QString &mlt_service, QVector<MltProperty> &properties);
72 bool checkMltVersion();
74 QXmlStreamReader m_xml;
75 QXmlStreamWriter m_newXml;
82 QScopedPointer<QTemporaryFile> m_tempFile;
83 bool m_numericValueChanged;
85 QStandardItemModel m_unlinkedFilesModel;
87 QVector<MltProperty> m_properties;
96 int audio_index, video_index;
102 info.setFile(QString());
108 audio_index = video_index = -1;
110 notProxyMeta =
false;
113 QVersionNumber m_mltVersion;
114 QString m_shotcutVersion;