21#include <MltProperties.h>
23#include <QColorDialog>
44 static QString baseName(
const QString &filePath,
bool trimQuery =
false);
45 static void setColorsToHighlight(QWidget *widget, QPalette::ColorRole role = QPalette::Window);
46 static void showInFolder(
const QString &path);
47 static bool warnIfNotWritable(
const QString &filePath, QWidget *parent,
const QString &caption);
48 static QString producerTitle(
const Mlt::Producer &producer);
49 static QString removeFileScheme(QUrl &url,
bool fromPercentEncoding =
true);
50 static const QStringList sortedFileList(
const QList<QUrl> &urls);
51 static int coerceMultiple(
int value,
int multiple = 2);
52 static QList<QUrl> expandDirectories(
const QList<QUrl> &urls);
53 static bool isDecimalPoint(QChar ch);
54 static bool isNumeric(QString &str);
55 static bool convertNumericString(QString &str, QChar decimalPoint);
56 static bool convertDecimalPoints(QString &str, QChar decimalPoint);
57 static void showFrameRateDialog(
const QString &caption,
59 QDoubleSpinBox *spinner,
60 QWidget *parent = Q_NULLPTR);
61 static QTemporaryFile *writableTemporaryFile(
const QString &filePath = QString(),
62 const QString &templateName = QString());
63 static void applyCustomProperties(Mlt::Producer &destination,
64 Mlt::Producer &source,
67 static QString getFileHash(
const QString &path);
68 static QString getHash(Mlt::Properties &properties);
69 static bool hasDriveLetter(
const QString &path);
70 static QColorDialog::ColorDialogOptions getColorDialogOptions();
71 static QFileDialog::Options getFileDialogOptions();
72 static bool isMemoryLow();
73 static QString removeQueryString(
const QString &s);
74 static int greatestCommonDivisor(
int m,
int n);
75 static void normalizeFrameRate(
double fps,
int &numerator,
int &denominator);
76 static QString textColor(
const QColor &color);
77 static void cameraFrameRateSize(
const QByteArray &deviceName, qreal &frameRate, QSize &size);
78 static bool ProducerIsTimewarp(Mlt::Producer *producer);
79 static QString GetFilenameFromProducer(Mlt::Producer *producer,
bool useOriginal =
true);
80 static double GetSpeedFromProducer(Mlt::Producer *producer);
81 static QString updateCaption(Mlt::Producer *producer);
82 static void passProducerProperties(Mlt::Producer *src, Mlt::Producer *dst);
83 static bool warnIfLowDiskSpace(
const QString &path);
84 static bool isFpsDifferent(
double a,
double b);
85 static QString getNextFile(
const QString &filePath);
86 static QString trcString(
int trc);
87 static bool trcIsCompatible(
int trc);
88 static QString getConversionAdvice(Mlt::Producer *producer);
89 static mlt_color mltColorFromQColor(
const QColor &color);
90 static void offerSingleFileConversion(QString &message,
91 Mlt::Producer *producer,
93 static double getAndroidFrameRate(Mlt::Producer *producer);
94 static double getSuggestedFrameRate(Mlt::Producer *producer);
95 static Mlt::Producer openMltVirtualClip(
const QString &path);
96 static bool hasiPhoneAmbisonic(Mlt::Producer *producer);
97 static bool installFlatpakWrappers(QWidget *parent);
98 static QString getExecutable(QWidget *parent);
101 static QPair<bool, bool> dockerStatus(
const QString &imageName);
102 static bool isDockerImageCurrent(
const QString &imageRef);
106 static void isDockerImageCurrentAsync(
const QString &imageRef,
108 std::function<
void(
bool)> callback);
109 static bool isChromiumAvailable();
110 static bool startDetached(
const QString &program,
const QStringList &arguments);
111 static bool openUrl(
const QUrl &url);