Debian Codegraph @

src/psfile.h

raw
1 /* dvbcut
2 Copyright (c) 2005 Sven Over <[email protected]>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 /* $Id$ */
20
21 #ifndef _DVBCUT_PSFILE_H
22 #define _DVBCUT_PSFILE_H
23
24 #include "mpgfile.h"
25
26 /**
27 @author Sven Over
28 */
29 class psfile : public mpgfile
30 {
31 protected:
32 int streamnumber[0x300]; // PS stream ids are 0..0xff plus possibly 2x256 private streams
33
34 public:
35 psfile(inbuffer &b, int initial_offset);
36
37 ~psfile();
38 int streamreader(struct streamhandle &s);
39 static int probe(inbuffer &buf);
40 virtual int mplayeraudioid(int astr)
41 {
42 int sid=s[audiostream(astr)].id;
43 if (sid>=0xc0 && sid<0xe0)
44 return sid-0xc0;
45 if (sid>=0x180 && sid<0x1a0)
46 return sid-0x100;
47 return 0;
48 }
49 };
50
51 #endif