blob: a563dea5d22654399d1912fa633ae7f704ec5473 (
plain) (
blame)
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
34
35
36
37
38
39
40
41
|
#ifndef ENCODETASK_H
#define ENCODETASK_H
#include "Task.h"
#include "EncodeTarget.h"
#include <QProcess>
#include <QTime>
#include <QList>
class EncodeTask : public Task
{
Q_OBJECT
public:
EncodeTask(QObject *parent = 0);
~EncodeTask();
bool canRunTask(const Movie *movie) const;
QString status() const;
protected:
bool executeTask(Movie *movie);
void cleanUp(bool result);
private:
void encode(EncodeTarget target);
void queueNext();
QProcess *m_process;
QString m_status;
QList<int> m_tasks;
private slots:
void finished(int exitCode, QProcess::ExitStatus exitStats);
void readyRead();
public slots:
void kill();
signals:
void encodeProgress(int currentTask, int totalTasks, float percent, float currentFps, float avgFps, QTime timeRemaining);
};
#endif // ENCODETASK_H
|