blob: 973357733f647584d6aceb2f97d0ce6573009e61 (
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
|
//
// C++ Interface: k9saveimage
//
// Description:
//
//
// Author: Jean-Michel PETIT <[email protected]>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9SAVEIMAGE_H
#define K9SAVEIMAGE_H
#include "k9common.h"
#include <qthread.h>
#include <qobject.h>
#include <qdatetime.h>
#include "k9fifo.h"
#include <ktempfile.h>
#include <qimage.h>
/**
@author Jean-Michel PETIT <[email protected]>
*/
typedef enum { FrameType_B=0x18,FrameType_I=0x08,FrameType_P=0x10,FrameType_D=0x20} eFrameType;
class kDecMPEG2;
class k9SaveImage : public QObject,QThread
{
Q_OBJECT
public:
k9SaveImage();
~k9SaveImage();
void play();
void stop();
void addData(uchar *_buffer, uint32_t _size);
protected:
void run();
public slots:
void drawImage(QImage*);
private:
kDecMPEG2 *m_decoder;
k9fifo m_fifo;
bool m_stop;
QTime m_timer;
uint m_cpt;
KTempFile *m_tempFile;
uchar *m_buffer;
uint32_t m_size;
QMutex m_mutex;
QImage m_image;
};
#endif
|