powerpc: use consistent types in mktree
[zen-stable.git] / drivers / media / dvb / dvb-core / dmxdev.h
blob29746e70d3252dedaa2a40856b91472e55934603
1 /*
2 * dmxdev.h
4 * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
5 * for convergence integrated media GmbH
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifndef _DMXDEV_H_
24 #define _DMXDEV_H_
26 #include <linux/types.h>
27 #include <linux/spinlock.h>
28 #include <linux/kernel.h>
29 #include <linux/timer.h>
30 #include <linux/wait.h>
31 #include <linux/fs.h>
32 #include <linux/string.h>
33 #include <linux/mutex.h>
35 #include <linux/dvb/dmx.h>
37 #include "dvbdev.h"
38 #include "demux.h"
39 #include "dvb_ringbuffer.h"
41 enum dmxdev_type {
42 DMXDEV_TYPE_NONE,
43 DMXDEV_TYPE_SEC,
44 DMXDEV_TYPE_PES,
47 enum dmxdev_state {
48 DMXDEV_STATE_FREE,
49 DMXDEV_STATE_ALLOCATED,
50 DMXDEV_STATE_SET,
51 DMXDEV_STATE_GO,
52 DMXDEV_STATE_DONE,
53 DMXDEV_STATE_TIMEDOUT
56 struct dmxdev_filter {
57 union {
58 struct dmx_section_filter *sec;
59 } filter;
61 union {
62 struct dmx_ts_feed *ts;
63 struct dmx_section_feed *sec;
64 } feed;
66 union {
67 struct dmx_sct_filter_params sec;
68 struct dmx_pes_filter_params pes;
69 } params;
71 enum dmxdev_type type;
72 enum dmxdev_state state;
73 struct dmxdev *dev;
74 struct dvb_ringbuffer buffer;
76 struct mutex mutex;
78 /* only for sections */
79 struct timer_list timer;
80 int todo;
81 u8 secheader[3];
85 struct dmxdev {
86 struct dvb_device *dvbdev;
87 struct dvb_device *dvr_dvbdev;
89 struct dmxdev_filter *filter;
90 struct dmx_demux *demux;
92 int filternum;
93 int capabilities;
95 unsigned int exit:1;
96 #define DMXDEV_CAP_DUPLEX 1
97 struct dmx_frontend *dvr_orig_fe;
99 struct dvb_ringbuffer dvr_buffer;
100 #define DVR_BUFFER_SIZE (10*188*1024)
102 struct mutex mutex;
103 spinlock_t lock;
107 int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *);
108 void dvb_dmxdev_release(struct dmxdev *dmxdev);
110 #endif /* _DMXDEV_H_ */