summaryrefslogtreecommitdiffstats
path: root/src/kviewmpeg2.h
blob: 5e901b23bca9212b85195f0d92c1c350fb0b691e (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/**************************************************************************
*   Copyright (C) 2005 by Jean-Michel Petit                               *
*   jm_petit@laposte.net                                                  *
*                                                                         *
*   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 <tqthread.h>
#include <viewmpeg2.h>
#include <tqwidget.h>
#include <tqstring.h>
#include <tqevent.h>
#include <tqmutex.h>
#include <tqgl.h>
#include "k9plaympeg2.h"
#include "k9glwidget.h"
#include "k9mplayer.h"

/**
  *@author 
  */

class k9Widget : public TQWidget {
TQ_OBJECT
  
protected:
   TQImage *m_image;
   void paintEvent ( TQPaintEvent * _event);
public:
   k9Widget (TQWidget *_parent);
   void setImage(TQImage *_image);
};


class kViewMPEG2 : public ViewMPEG2  {
TQ_OBJECT
  
public: 
	kViewMPEG2();
	~kViewMPEG2();
private:
  TQMutex mutex;
  k9DVDTitle *m_title;
  TQString dev;
  int selTitle;
  unsigned long  idxLect;
  bool pause;
  bool lockSlider;
  TQImage img;
  bool stopped;
  void sliderReleased();  
  /** No descriptions */
  void sliderPressed();
  void lock();
  void unlock();
  TQString file;
  TQString errMsg;
  bool error;
  TQString length;
  uint startSector;
  uint lastSector;
  k9PlayMPEG2 m_player;
  TQGridLayout *m_layout;
  bool m_prefUseGL;
  k9GLWidget *m_GLwidget;
  k9Widget *m_widget;
protected:
 void closeEvent( TQCloseEvent* );
 void resizeEvent ( TQResizeEvent * );
public slots: // Public slots
  /** No descriptions */
  void open (k9DVD *_dvd,k9DVDTitle * title,int chapter);
  void drawPixmap( TQImage *image);
  void drawppm(uchar *_buf,int _width,int _height,int _len);
  void setError(const TQString & err);
  void setPosition(uint32_t _position);
  void setMax(uint32_t _position);
  void setMin(uint32_t _position);
  void bPlayClick();
  void bStopClick();
  void readSettings();

};

#endif