Path: blob/master/drivers/media/dvb/dvb-core/dmxdev.h
15112 views
/*1* dmxdev.h2*3* Copyright (C) 2000 Ralph Metzler & Marcus Metzler4* for convergence integrated media GmbH5*6* This program is free software; you can redistribute it and/or7* modify it under the terms of the GNU Lesser General Public License8* as published by the Free Software Foundation; either version 2.19* of the License, or (at your option) any later version.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU Lesser General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.19*20*/2122#ifndef _DMXDEV_H_23#define _DMXDEV_H_2425#include <linux/types.h>26#include <linux/spinlock.h>27#include <linux/kernel.h>28#include <linux/timer.h>29#include <linux/wait.h>30#include <linux/fs.h>31#include <linux/string.h>32#include <linux/mutex.h>33#include <linux/slab.h>3435#include <linux/dvb/dmx.h>3637#include "dvbdev.h"38#include "demux.h"39#include "dvb_ringbuffer.h"4041enum dmxdev_type {42DMXDEV_TYPE_NONE,43DMXDEV_TYPE_SEC,44DMXDEV_TYPE_PES,45};4647enum dmxdev_state {48DMXDEV_STATE_FREE,49DMXDEV_STATE_ALLOCATED,50DMXDEV_STATE_SET,51DMXDEV_STATE_GO,52DMXDEV_STATE_DONE,53DMXDEV_STATE_TIMEDOUT54};5556struct dmxdev_feed {57u16 pid;58struct dmx_ts_feed *ts;59struct list_head next;60};6162struct dmxdev_filter {63union {64struct dmx_section_filter *sec;65} filter;6667union {68/* list of TS and PES feeds (struct dmxdev_feed) */69struct list_head ts;70struct dmx_section_feed *sec;71} feed;7273union {74struct dmx_sct_filter_params sec;75struct dmx_pes_filter_params pes;76} params;7778enum dmxdev_type type;79enum dmxdev_state state;80struct dmxdev *dev;81struct dvb_ringbuffer buffer;8283struct mutex mutex;8485/* only for sections */86struct timer_list timer;87int todo;88u8 secheader[3];89};909192struct dmxdev {93struct dvb_device *dvbdev;94struct dvb_device *dvr_dvbdev;9596struct dmxdev_filter *filter;97struct dmx_demux *demux;9899int filternum;100int capabilities;101102unsigned int exit:1;103#define DMXDEV_CAP_DUPLEX 1104struct dmx_frontend *dvr_orig_fe;105106struct dvb_ringbuffer dvr_buffer;107#define DVR_BUFFER_SIZE (10*188*1024)108109struct mutex mutex;110spinlock_t lock;111};112113114int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *);115void dvb_dmxdev_release(struct dmxdev *dmxdev);116117#endif /* _DMXDEV_H_ */118119120