blob: e37aa1de3cd0bb9aa872748c3c9d70ee18e73e37 (
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
|
//
// C++ Interface: k9saveimage
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9SAVEIMAGE_H
#define K9SAVEIMAGE_H
#include "k9common.h"
#include <tqthread.h>
#include <tqobject.h>
#include <tqdatetime.h>
#include "k9fifo.h"
#include <ktempfile.h>
#include <tqimage.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
typedef enum { FrameType_B=0x18,FrameType_I=0x08,FrameType_P=0x10,FrameType_D=0x20} eFrameType;
class kDecMPEG2;
class k9SaveImage : public TQObject,TQThread
{
Q_OBJECT
TQ_OBJECT
public:
k9SaveImage();
~k9SaveImage();
void play();
void stop();
void addData(uchar *_buffer, uint32_t _size);
protected:
void run();
public slots:
void drawImage(TQImage*);
private:
kDecMPEG2 *m_decoder;
k9fifo m_fifo;
bool m_stop;
TQTime m_timer;
uint m_cpt;
KTempFile *m_tempFile;
uchar *m_buffer;
uint32_t m_size;
TQMutex m_mutex;
TQImage m_image;
};
#endif
|