ensuring UI items are parented

This commit is contained in:
itsmattkc
2019-01-30 14:03:23 +11:00
parent fac9213833
commit 373875c72b
9 changed files with 70 additions and 57 deletions
+4 -1
View File
@@ -27,7 +27,10 @@ extern "C" {
#include <QOpenGLPaintDevice>
#include <QPainter>
ExportThread::ExportThread() : continueEncode(true) {
ExportThread::ExportThread(QObject *parent) :
QThread(parent),
continueEncode(true)
{
surface.create();
fmt_ctx = nullptr;
+1 -1
View File
@@ -28,7 +28,7 @@ extern "C" {
class ExportThread : public QThread {
Q_OBJECT
public:
ExportThread();
ExportThread(QObject* parent = nullptr);
void run();
// export parameters
+15 -13
View File
@@ -4,10 +4,12 @@
#include <QThread>
#include <QSemaphore>
#define ICON_TYPE_VIDEO 0
#define ICON_TYPE_AUDIO 1
#define ICON_TYPE_IMAGE 2
#define ICON_TYPE_ERROR 3
enum IconType {
ICON_TYPE_VIDEO,
ICON_TYPE_AUDIO,
ICON_TYPE_IMAGE,
ICON_TYPE_ERROR
};
struct Footage;
struct FootageStream;
@@ -16,28 +18,28 @@ class Media;
class PreviewGenerator : public QThread
{
Q_OBJECT
Q_OBJECT
public:
PreviewGenerator(Media*, Footage*, bool);
void run();
void run();
void cancel();
signals:
void set_icon(int, bool);
private:
void parse_media();
void parse_media();
bool retrieve_preview(const QString &hash);
void generate_waveform();
void generate_waveform();
void finalize_media();
AVFormatContext* fmt_ctx;
Media* media;
Footage* footage;
AVFormatContext* fmt_ctx;
Media* media;
Footage* footage;
bool retrieve_duration;
bool contains_still_image;
bool replace;
bool cancelled;
QString data_path;
QString get_thumbnail_path(const QString &hash, const FootageStream &ms);
QString get_waveform_path(const QString& hash, const FootageStream &ms);
QString get_thumbnail_path(const QString &hash, const FootageStream &ms);
QString get_waveform_path(const QString& hash, const FootageStream &ms);
};
#endif // PREVIEWGENERATOR_H