21 #include <MltProperties.h>
22 #include <QFileDialog>
41 static QString baseName(
const QString &filePath,
bool trimQuery =
false);
42 static void setColorsToHighlight(QWidget *widget, QPalette::ColorRole role = QPalette::Window);
43 static void showInFolder(
const QString &path);
44 static bool warnIfNotWritable(
const QString &filePath, QWidget *parent,
const QString &caption);
45 static QString producerTitle(
const Mlt::Producer &producer);
46 static QString removeFileScheme(QUrl &url,
bool fromPercentEncoding =
true);
47 static const QStringList sortedFileList(
const QList<QUrl> &urls);
48 static int coerceMultiple(
int value,
int multiple = 2);
49 static QList<QUrl> expandDirectories(
const QList<QUrl> &urls);
50 static bool isDecimalPoint(QChar ch);
51 static bool isNumeric(QString &str);
52 static bool convertNumericString(QString &str, QChar decimalPoint);
53 static bool convertDecimalPoints(QString &str, QChar decimalPoint);
54 static void showFrameRateDialog(
const QString &caption,
56 QDoubleSpinBox *spinner,
57 QWidget *parent = Q_NULLPTR);
58 static QTemporaryFile *writableTemporaryFile(
const QString &filePath = QString(),
59 const QString &templateName = QString());
60 static void applyCustomProperties(Mlt::Producer &destination,
61 Mlt::Producer &source,
64 static QString getFileHash(
const QString &path);
65 static QString getHash(Mlt::Properties &properties);
66 static bool hasDriveLetter(
const QString &path);
67 static QFileDialog::Options getFileDialogOptions();
68 static bool isMemoryLow();
69 static QString removeQueryString(
const QString &s);
70 static int greatestCommonDivisor(
int m,
int n);
71 static void normalizeFrameRate(
double fps,
int &numerator,
int &denominator);
72 static QString textColor(
const QColor &color);
73 static void cameraFrameRateSize(
const QByteArray &deviceName, qreal &frameRate, QSize &size);
74 static bool ProducerIsTimewarp(Mlt::Producer *producer);
75 static QString GetFilenameFromProducer(Mlt::Producer *producer,
bool useOriginal =
true);
76 static double GetSpeedFromProducer(Mlt::Producer *producer);
77 static QString updateCaption(Mlt::Producer *producer);
78 static void passProducerProperties(Mlt::Producer *src, Mlt::Producer *dst);
79 static bool warnIfLowDiskSpace(
const QString &path);
80 static bool isFpsDifferent(
double a,
double b);
81 static QString getNextFile(
const QString &filePath);
82 static QString trcString(
int trc);
83 static bool trcIsCompatible(
int trc);
84 static QString getConversionAdvice(Mlt::Producer *producer);
85 static mlt_color mltColorFromQColor(
const QColor &color);
86 static void offerSingleFileConversion(QString &message,
87 Mlt::Producer *producer,
89 static double getAndroidFrameRate(Mlt::Producer *producer);
90 static double getSuggestedFrameRate(Mlt::Producer *producer);
91 static Mlt::Producer openMltVirtualClip(
const QString &path);