summaryrefslogtreecommitdiffstats
path: root/k9decmpeg/k9plaympeg2.h
blob: 28a2f19eed19ae99f69557e07435313a519ba120 (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
//
// C++ Interface: k9plaympeg2
//
// Description: 
//
//
// Author: Jean-Michel PETIT <[email protected]>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9PLAYMPEG2_H
#define K9PLAYMPEG2_H

#include "k9common.h"
#include "k9dvdtitle.h"


#include <tqthread.h>
#include <tqobject.h>
#include <tqmutex.h>
#include <tqwidget.h>
#include "k9decodethread.h"
/**
	@author Jean-Michel PETIT <[email protected]>
*/
class k9PlayMPEG2 : public TQObject,public TQThread
{
Q_OBJECT
  TQ_OBJECT
private:
   k9DVDTitle *m_title;
   TQString m_device;
   k9DecodeThread m_decoder;
   uint32_t m_idxLect;
   uint32_t m_startSector;
   uint32_t m_lastSector;
   bool m_stopped;
   dvd_file_t *dvdfile;
   TQMutex mutex;
   dvd_reader_t *m_dvd;
   int m_chapter;
public:
    k9PlayMPEG2();
    void open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter);
    kDecMPEG2 *getDecoder();
    void setDvd(dvd_reader_t* _value) { m_dvd = _value;}
    dvd_reader_t* getDvd() const {return m_dvd;}
    ~k9PlayMPEG2();
protected:
    void run();
    void playTitle();
public slots:
  void stop();
  void play();
  void updatePos(uint32_t _position);	
	
signals:
  void setPosition(uint32_t _position);
  void setMin(uint32_t _sector);
  void setMax(uint32_t _sector);

  void setError(const TQString & err);

};

#endif