-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudioextractor.h
40 lines (31 loc) · 898 Bytes
/
audioextractor.h
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
#ifndef AUDIOEXTRACTOR_H
#define AUDIOEXTRACTOR_H
#include <QObject>
#include <QSettings>
#include <QProcess>
class AudioExtractor : public QObject
{
Q_OBJECT
public:
explicit AudioExtractor(QObject *parent = 0);
int extractAudio(const QString& videoId);
void codecInfo(const QString& videoId);
signals:
void infoChanged(const QString& info);
void extractStateChanged(int state);
void encodeStateChanged(int state);
public slots:
void extractFinished(int exitCode, QProcess::ExitStatus exitStatus);
void encodeFinished(int exitCode, QProcess::ExitStatus exitStatus);
void showCodec();
void encodeX264(const QString& videoId);
private:
QString probeVideo();
private:
QString iVideoFile;
QSettings* settings;
QProcess extractProcess;
QProcess codecProcess;
QProcess encodeProcess;
};
#endif // AUDIOEXTRACTOR_H