ensuring UI items are parented
This commit is contained in:
+4
-1
@@ -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
@@ -28,7 +28,7 @@ extern "C" {
|
||||
class ExportThread : public QThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExportThread();
|
||||
ExportThread(QObject* parent = nullptr);
|
||||
void run();
|
||||
|
||||
// export parameters
|
||||
|
||||
+15
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user