summaryrefslogtreecommitdiffstats
path: root/src/kviewmpeg2.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 /src/kviewmpeg2.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 'src/kviewmpeg2.h')
-rwxr-xr-xsrc/kviewmpeg2.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/kviewmpeg2.h b/src/kviewmpeg2.h
new file mode 100755
index 0000000..bd21253
--- /dev/null
+++ b/src/kviewmpeg2.h
@@ -0,0 +1,101 @@
+/**************************************************************************
+* Copyright (C) 2005 by Jean-Michel Petit *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+* GNU General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+***************************************************************************/
+
+#ifndef KVIEWMPEG2_H
+#define KVIEWMPEG2_H
+
+#include "k9dvdtitle.h"
+
+#include <qthread.h>
+#include <viewmpeg2.h>
+#include <qwidget.h>
+#include <qstring.h>
+#include <qevent.h>
+#include <qmutex.h>
+#include <qgl.h>
+#include "k9plaympeg2.h"
+#include "k9glwidget.h"
+#include "k9mplayer.h"
+
+/**
+ *@author
+ */
+
+class k9Widget : public QWidget {
+Q_OBJECT
+protected:
+ QImage *m_image;
+ void paintEvent ( QPaintEvent * _event);
+public:
+ k9Widget (QWidget *_parent);
+ void setImage(QImage *_image);
+};
+
+
+class kViewMPEG2 : public ViewMPEG2 {
+Q_OBJECT
+public:
+ kViewMPEG2();
+ ~kViewMPEG2();
+private:
+ QMutex mutex;
+ k9DVDTitle *m_title;
+ QString dev;
+ int selTitle;
+ unsigned long idxLect;
+ bool pause;
+ bool lockSlider;
+ QImage img;
+ bool stopped;
+ void sliderReleased();
+ /** No descriptions */
+ void sliderPressed();
+ void lock();
+ void unlock();
+ QString file;
+ QString errMsg;
+ bool error;
+ QString length;
+ uint startSector;
+ uint lastSector;
+ k9PlayMPEG2 m_player;
+ QGridLayout *m_layout;
+ bool m_prefUseGL;
+ k9GLWidget *m_GLwidget;
+ k9Widget *m_widget;
+protected:
+ void closeEvent( QCloseEvent* );
+ void resizeEvent ( QResizeEvent * );
+public slots: // Public slots
+ /** No descriptions */
+ int open (k9DVD *_dvd,k9DVDTitle * title,int chapter);
+ void drawPixmap( QImage *image);
+ void drawppm(uchar *_buf,int _width,int _height,int _len);
+ void setError(const QString & err);
+ void setPosition(uint32_t _position);
+ void setMax(uint32_t _position);
+ void setMin(uint32_t _position);
+ void bPlayClick();
+ void bStopClick();
+ void readSettings();
+
+};
+
+#endif