blob: 91a80a25deeb9a7cd1b0f406324652f9fa1be6e7 (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
//
// C++ Interface: k9mp4enc
//
// Description:
//
//
// Author: Jean-Michel PETIT <[email protected]>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9MP4ENC_H
#define K9MP4ENC_H
#include "k9common.h"
#include "k9dvdtitle.h"
#include <qobject.h>
#include <k9process.h>
#include <qtimer.h>
#include <qstringlist.h>
class k9MP4Dlg;
/**
@author Jean-Michel PETIT <[email protected]>
*/
class k9MP4Enc : public QObject {
Q_OBJECT
private:
k9Process *m_process;
k9MP4Dlg *m_progress;
k9DVDTitle *m_title;
int getBitRate(k9DVDTitle *_title);
QString m_txt;
QString m_device;
QString m_filename;
QString m_height;
QString m_width;
QString m_size;
QString m_audioBitrate;
QString m_videoBitrate;
QString m_audioGain;
QString m_fourcc;
QString m_stderr;
int m_parts;
float m_percent;
QTimer *timer;
QString m_remain;
uint32_t m_totalSize;
bool m_2pass;
int m_pass;
bool m_canceled;
int m_codec;
int m_audioCodec;
bool m_usecache;
bool m_mpeg2;
bool m_mpegChapters;
QStringList m_lstVideo,m_lstAudio,m_lstCodecs;
int m_cpt;
QTime *time,m_timer3;
QString replaceParams(QString _input);
QString round16(QString _wh);
QString getChapterList(k9DVDTitle *_title);
int getselectedSubp(k9DVDTitle *_title);
private slots:
void getStdout(KProcess *proc, char *buffer, int buflen);
void getStderr(KProcess *proc, char *buffer, int buflen);
void timerDone();
void slotCancel();
public:
k9MP4Enc(QObject *parent = 0, const char *name = 0,const QStringList& args=0);
~k9MP4Enc();
virtual void execute(k9DVDTitle *_title );
virtual void setNumberCD(const QString & _value) {
m_parts = _value.toInt();
if (m_parts==0) m_parts=1;
}
virtual void setDevice(const QString& _value) {
m_device = _value.stripWhiteSpace();
};
virtual void setFilename(const QString& _value) {
m_filename = _value.stripWhiteSpace();
};
virtual void setHeight(const QString& _value) {
m_height = _value.stripWhiteSpace();
};
virtual void setWidth(const QString& _value) {
m_width = _value.stripWhiteSpace();
};
virtual void setSize(const QString& _value) {
m_size = _value.stripWhiteSpace();
};
virtual void setAudioBitrate(const QString& _value) {
m_audioBitrate = _value.stripWhiteSpace();
};
virtual void setVideoBitrate(const QString& _value) {
m_videoBitrate = _value.stripWhiteSpace();
};
virtual void setAudioGain(const QString& _value) {
m_audioGain = _value.stripWhiteSpace();
};
virtual void setfourcc(const QString& _value) {
m_fourcc = _value.stripWhiteSpace();
};
virtual void set2Passes(bool _value) {
m_2pass=_value;
}
virtual void setUseCache(bool _value) {
m_usecache=_value;
}
virtual void setMpeg2(bool _value) {
m_mpeg2=_value;
}
virtual void setCodec(const int& _value) {m_codec = _value;};
virtual void setAudioCodec(const int& _value) {m_audioCodec = _value;};
virtual QWidget *getDialog() {return (QWidget*)m_progress;};
virtual bool isCanceled();
};
#endif
|