V4L/DVB (3436): Remove 'dvbdev' from struct dmxdev_filter
[linux-2.6/mini2440.git] / drivers / media / dvb / dvb-core / dmxdev.h
blob5d4d18a00a6855b016fbbda2f5c42a1cac9038f5
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"
40 enum dmxdevype {
41 DMXDEV_TYPE_NONE,
42 DMXDEV_TYPE_SEC,
43 DMXDEV_TYPE_PES,
46 enum dmxdev_state {
47 DMXDEV_STATE_FREE,
48 DMXDEV_STATE_ALLOCATED,
49 DMXDEV_STATE_SET,
50 DMXDEV_STATE_GO,
51 DMXDEV_STATE_DONE,
52 DMXDEV_STATE_TIMEDOUT
55 struct dmxdev_buffer {
56 u8 *data;
57 int size;
58 int pread;
59 int pwrite;
60 wait_queue_head_t queue;
61 int error;
64 struct dmxdev_filter {
65 union {
66 struct dmx_section_filter *sec;
67 } filter;
69 union {
70 struct dmx_ts_feed *ts;
71 struct dmx_section_feed *sec;
72 } feed;
74 union {
75 struct dmx_sct_filter_params sec;
76 struct dmx_pes_filter_params pes;
77 } params;
79 int type;
80 enum dmxdev_state state;
81 struct dmxdev *dev;
82 struct dmxdev_buffer buffer;
84 struct mutex mutex;
86 /* only for sections */
87 struct timer_list timer;
88 int todo;
89 u8 secheader[3];
93 struct dmxdev {
94 struct dvb_device *dvbdev;
95 struct dvb_device *dvr_dvbdev;
97 struct dmxdev_filter *filter;
98 struct dmx_demux *demux;
100 int filternum;
101 int capabilities;
102 #define DMXDEV_CAP_DUPLEX 1
103 struct dmx_frontend *dvr_orig_fe;
105 struct dmxdev_buffer dvr_buffer;
106 #define DVR_BUFFER_SIZE (10*188*1024)
108 struct mutex mutex;
109 spinlock_t lock;
113 int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *);
114 void dvb_dmxdev_release(struct dmxdev *dmxdev);
116 #endif /* _DMXDEV_H_ */