Debian Codegraph @

src/muxer.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_MUXER_H
22 #define _DVBCUT_MUXER_H
23
24 #include <stdint.h>
25 #include "pts.h"
26 #include "defines.h"
27
28 /**
29 @author Sven Over
30 */
31 class muxer
32 {
33 protected:
34 pts_t pts[MAXAVSTREAMS];
35 pts_t dts[MAXAVSTREAMS];
36 bool strpres[MAXAVSTREAMS];
37 bool empty;
38
39 public:
40 muxer() : pts(), dts(), strpres(), empty(true)
41 {}
42 virtual ~muxer()
43 {}
44
45 pts_t getpts(int str) const
46 {
47 return pts[str];
48 }
49 void setpts(int str, pts_t p)
50 {
51 pts[str]=p;
52 }
53 pts_t getdts(int str) const
54 {
55 return dts[str];
56 }
57 void setdts(int str, pts_t d)
58 {
59 dts[str]=d;
60 }
61 bool streampresent(int str) const
62 {
63 return strpres[str];
64 }
65 void unsetempty()
66 {
67 empty=false;
68 }
69 bool isempty()
70 {
71 return empty;
72 }
73
74 virtual bool putpacket(int str, const void *data, int len, pts_t pts, pts_t dts, uint32_t flags=0)=0;
75 virtual bool ready()
76 {
77 return false;
78 }
79 virtual void finish()
80 {
81 return;
82 }
83 };
84
85 #endif