summaryrefslogtreecommitdiffstats
path: root/libk9copy/k9saveimage.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
commit0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch)
tree8578dcddfce4191f3f7a142a37769df7add48475 /libk9copy/k9saveimage.h
downloadk9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz
k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk9copy/k9saveimage.h')
-rw-r--r--libk9copy/k9saveimage.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/libk9copy/k9saveimage.h b/libk9copy/k9saveimage.h
new file mode 100644
index 0000000..9733577
--- /dev/null
+++ b/libk9copy/k9saveimage.h
@@ -0,0 +1,60 @@
+//
+// 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 <qthread.h>
+#include <qobject.h>
+#include <qdatetime.h>
+
+#include "k9fifo.h"
+#include <ktempfile.h>
+#include <qimage.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 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