-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkerThread.h
More file actions
33 lines (26 loc) · 1.01 KB
/
WorkerThread.h
File metadata and controls
33 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef WORKERTHREAD_H
#define WORKERTHREAD_H
#include <QThread>
#include <QString>
#include <QMediaPlayer>
#include <QJsonObject>
class WorkerThread : public QObject
{
Q_OBJECT
public:
explicit WorkerThread(QObject *parent = nullptr);
Q_INVOKABLE void loadMedia(const QString &filePath);
~WorkerThread();
public:
int videos_compose_transition(const std::string& filename0, const std::string& filename1);
int compose_transition(QJsonObject jsonData);
void multi_videos_audio_compose_transition(const std::vector<std::string> &filenames, const std::string &bgm_filename,float bgm_gain);
void videos_audio_compose_transition(const std::string &filename, const std::string &bgm_filename, float bgm_gain) ;
Q_INVOKABLE void doCompose();
Q_INVOKABLE void doWork() ; // Run the thread's task
private:
QMediaPlayer *mediaPlayer;
QString currentFilePath; // To store the current video file path
QString label = "123456789";
};
#endif // WORKERTHREAD_H