Debian Codegraph @

samples/qtrecompress/recwnd.h

raw
1 #ifndef RECWINDOW_H
2 #define RECWINDOW_H
3
4 #include "recwnd_p.h"
5 #include "rec_cb.h"
6
7 class RecKernel;
8
9 class Progress
10 {
11 unsigned int* m_pValues;
12 int* m_pValuesFlags;
13 unsigned int m_uiPos;
14 unsigned int m_uiSize;
15 unsigned int m_uiMax;
16 bool m_bValidMax;
17 public:
18 Progress(unsigned int size);
19 ~Progress();
20 void insert(unsigned int v, int flags);
21 unsigned int getMax();
22 unsigned int get(int idx) { return m_pValues[idx]; }
23 int getFlags(int idx) { return m_pValuesFlags[idx]; }
24 };
25
26 class RecWindow : public RecWnd_p, public IRecompressCallback
27 {
28 Q_OBJECT
29 RecKernel* kernel;
30 double progress, elapsed, estimated;
31 int64_t fsize;
32
33 static const int PROGRESS_SIZE = 200;
34 Progress m_Progress;
35
36 framepos_t totalVideoFrames;
37 unsigned int totalAudioSamples;
38 framepos_t curVideoFrame;
39 framepos_t curAudioSample;
40 double startVideoTime;
41 double startAudioTime;
42 double curVideoTime;
43 double curAudioTime;
44 int64_t videoSize;
45 int64_t audioSize;
46 int64_t lasttime;
47
48 public:
49 RecWindow( QWidget* parent, RecKernel* kern);
50 ~RecWindow();
51
52 virtual void setNewState(double progress, double elapsed, int64_t fsize);
53 virtual void setTotal(framepos_t vtotal, framepos_t atotal,
54 double videoTime, double audioTime);
55 virtual void addVideo(framepos_t vframe, unsigned int vsize, double videoTime, bool keyframe);
56 virtual void addAudio(framepos_t asample, unsigned int asize, double atime);
57 virtual void finished();
58
59 bool update();
60
61 public slots:
62 virtual void cancelProcess();
63 virtual void pauseProcess();
64 virtual void currentChanged(QWidget*);
65 protected:
66 bool event(QEvent*);
67 bool updateGraphs();
68 // bool close(bool){return false;}
69 };
70
71 #endif // RECWINDOW_H