dvbd / src / demuxer.h @ 59be6a47
History | View | Annotate | Download (1.44 KB)
1 |
// -*- c++ -*-
|
---|---|
2 |
/*
|
3 |
Copyright 2003 John Knottenbelt
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License as published by
|
7 |
the Free Software Foundation; either version 2 of the License, or
|
8 |
(at your option) any later version.
|
9 |
|
10 |
This program is distributed in the hope that it will be useful,
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
GNU General Public License for more details.
|
14 |
|
15 |
You should have received a copy of the GNU General Public License
|
16 |
along with this program; if not, write to the Free Software
|
17 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
18 |
*/
|
19 |
|
20 |
#if !defined __DEMUXER_H
|
21 |
#define __DEMUXER_H
|
22 |
|
23 |
#include "source.h" |
24 |
|
25 |
class Tuner; |
26 |
|
27 |
class Demuxer : public Source, public Sink { |
28 |
public:
|
29 |
enum PESType { Video, Audio, Teletext };
|
30 |
|
31 |
protected:
|
32 |
|
33 |
friend class Tuner; |
34 |
Demuxer(Tuner *tuner, int pid, PESType pestype);
|
35 |
virtual ~Demuxer(); |
36 |
|
37 |
public:
|
38 |
|
39 |
int getPID() const { return pid; } |
40 |
|
41 |
virtual void receiveData(unsigned char *data, unsigned size); |
42 |
virtual bool subscribe(Sink *s);
|
43 |
virtual void unsubscribe(Sink *s);
|
44 |
virtual void notifyUnsubscribe(Source *s);
|
45 |
|
46 |
protected:
|
47 |
virtual bool openDemux();
|
48 |
virtual void closeDemux();
|
49 |
virtual void setTSFilt( bool dmxOther ); |
50 |
|
51 |
private:
|
52 |
Tuner *tuner; |
53 |
int pid;
|
54 |
int demuxFD;
|
55 |
int pesType;
|
56 |
}; |
57 |
|
58 |
#endif // __DEMUXER_H |