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