blob: 00fcb2a791b87c19e70dc4becd2a0c52830ebde9 (
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
|
//
// C++ Interface: k9newdvd
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9NEWDVD_H
#define K9NEWDVD_H
#include "k9common.h"
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqdom.h>
#include <tqdatetime.h>
#include "k9process.h"
#include "k9progress.h"
#include "k9avidecode.h"
#include "k9config.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9Title;
class k9AviFile;
class k9Menu;
class k9ProcessList;
class k9NewDVDItems : public TQPtrList<k9Title> {
protected:
virtual int compareItems ( TQPtrCollection::Item item1,TQPtrCollection::Item item2 );
};
class k9NewDVD : public TQObject {
TQ_OBJECT
public:
enum eFormat {NTSC=2,PAL=1};
k9NewDVD ( TQObject *parent = 0, const char *name = 0 );
~k9NewDVD();
k9NewDVDItems* getTitles() {
return &m_titles;
}
eFormat m_format;
void execute();
void createXML();
void addTitles ( TQDomElement &_root );
void setFormat ( const eFormat& _value );
void setWorkDir ( const TQString& _value );
void appendTitle ( k9Title *_title );
void setProcessList(k9ProcessList *_value);
eFormat getFormat() const;
int getTotalTime();
k9Menu* getRootMenu() const;
TQString getError() const;
private:
k9NewDVDItems m_titles;
TQStringList m_tmpFiles;
TQDomDocument *m_xml;
TQString m_workDir;
k9ProcessList *m_processList;
TQTime m_timer;
TQTime m_timer2;
TQTime m_timer3;
k9Menu *m_rootMenu;
bool m_cancel;
TQString m_error;
TQString m_stdout;
int m_videoBitrate;
k9AviDecode m_aviDecode;
int m_totalEncodedSize;
int m_offset;
int m_lastvalue;
TQMap <k9Process*,TQTime> m_timers;
void calcVideoBitrate();
void createMencoderCmd ( TQString &_cmd,TQString &_chapters, k9AviFile *_aviFile );
k9Config *m_config;
protected slots:
void getStdout ( TDEProcess *, char *, int );
void getStderr ( TDEProcess *, char *, int );
void drawImage ( TQImage * _image );
signals:
void sigAddTitle();
};
#endif
|