2005-04-16 12:51:09 +00:00
|
|
|
/* Imported from the dvbstream project
|
|
|
|
*
|
2006-06-22 13:34:00 +00:00
|
|
|
* Modified for use with MPlayer, for details see the changelog at
|
|
|
|
* http://svn.mplayerhq.hu/mplayer/trunk/
|
2005-04-16 12:51:09 +00:00
|
|
|
* $Id$
|
|
|
|
*/
|
2003-03-16 20:13:28 +00:00
|
|
|
|
|
|
|
#ifndef DVBIN_H
|
|
|
|
#define DVBIN_H
|
|
|
|
|
2003-08-11 00:02:46 +00:00
|
|
|
#include "stream.h"
|
|
|
|
|
2006-07-14 22:07:05 +00:00
|
|
|
#define SLOF (11700*1000UL)
|
|
|
|
#define LOF1 (9750*1000UL)
|
|
|
|
#define LOF2 (10600*1000UL)
|
|
|
|
|
2003-03-16 20:13:28 +00:00
|
|
|
#ifdef HAVE_DVB_HEAD
|
|
|
|
#include <linux/dvb/dmx.h>
|
|
|
|
#include <linux/dvb/frontend.h>
|
2005-01-06 09:43:10 +00:00
|
|
|
#include <linux/dvb/version.h>
|
2003-03-16 20:13:28 +00:00
|
|
|
#else
|
|
|
|
#include <ost/dmx.h>
|
|
|
|
#include <ost/sec.h>
|
|
|
|
#include <ost/frontend.h>
|
|
|
|
#define fe_status_t FrontendStatus
|
|
|
|
#define fe_spectral_inversion_t SpectralInversion
|
|
|
|
#define fe_modulation_t Modulation
|
|
|
|
#define fe_code_rate_t CodeRate
|
|
|
|
#define fe_transmit_mode_t TransmitMode
|
|
|
|
#define fe_guard_interval_t GuardInterval
|
|
|
|
#define fe_bandwidth_t BandWidth
|
2004-08-26 19:38:16 +00:00
|
|
|
#define fe_hierarchy_t Hierarchy
|
2003-03-16 20:13:28 +00:00
|
|
|
#define fe_sec_voltage_t SecVoltage
|
|
|
|
#define dmx_pes_filter_params dmxPesFilterParams
|
|
|
|
#define dmx_sct_filter_params dmxSctFilterParams
|
|
|
|
#define dmx_pes_type_t dmxPesType_t
|
|
|
|
#endif
|
|
|
|
|
2005-01-06 09:43:10 +00:00
|
|
|
#undef DVB_ATSC
|
|
|
|
#if defined(DVB_API_VERSION_MINOR)
|
|
|
|
#if DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1
|
|
|
|
#define DVB_ATSC 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2003-03-16 20:13:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define DVB_CHANNEL_LOWER -1
|
|
|
|
#define DVB_CHANNEL_HIGHER 1
|
|
|
|
|
2003-07-08 17:01:44 +00:00
|
|
|
#include "inttypes.h"
|
2003-03-16 20:13:28 +00:00
|
|
|
|
2004-07-12 20:52:02 +00:00
|
|
|
#ifndef DMX_FILTER_SIZE
|
|
|
|
#define DMX_FILTER_SIZE 16
|
|
|
|
#endif
|
2003-03-16 20:13:28 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *name;
|
|
|
|
int freq, srate, diseqc, tone;
|
|
|
|
char pol;
|
2004-07-12 20:52:02 +00:00
|
|
|
int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt;
|
2003-03-16 20:13:28 +00:00
|
|
|
fe_spectral_inversion_t inv;
|
|
|
|
fe_modulation_t mod;
|
|
|
|
fe_transmit_mode_t trans;
|
|
|
|
fe_bandwidth_t bw;
|
|
|
|
fe_guard_interval_t gi;
|
2004-08-26 19:38:16 +00:00
|
|
|
fe_code_rate_t cr, cr_lp;
|
|
|
|
fe_hierarchy_t hier;
|
2003-03-16 20:13:28 +00:00
|
|
|
} dvb_channel_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint16_t NUM_CHANNELS;
|
|
|
|
uint16_t current;
|
2004-04-26 21:22:33 +00:00
|
|
|
dvb_channel_t *channels;
|
2003-03-16 20:13:28 +00:00
|
|
|
} dvb_channels_list;
|
|
|
|
|
2004-04-26 21:22:33 +00:00
|
|
|
typedef struct {
|
|
|
|
int type;
|
|
|
|
dvb_channels_list *list;
|
|
|
|
char *name;
|
|
|
|
int devno;
|
|
|
|
} dvb_card_config_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int count;
|
|
|
|
dvb_card_config_t *cards;
|
|
|
|
void *priv;
|
|
|
|
} dvb_config_t;
|
2003-03-16 20:13:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2003-08-11 00:02:46 +00:00
|
|
|
int card;
|
2003-03-16 20:13:28 +00:00
|
|
|
int fe_fd;
|
|
|
|
int sec_fd;
|
2004-07-12 20:52:02 +00:00
|
|
|
int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt;
|
2003-03-16 20:13:28 +00:00
|
|
|
int dvr_fd;
|
|
|
|
|
2004-04-26 21:22:33 +00:00
|
|
|
dvb_config_t *config;
|
2003-03-16 20:13:28 +00:00
|
|
|
dvb_channels_list *list;
|
2003-08-11 00:02:46 +00:00
|
|
|
int tuner_type;
|
|
|
|
int is_on;
|
|
|
|
stream_t *stream;
|
|
|
|
char new_tuning[256], prev_tuning[256];
|
|
|
|
int retry;
|
2006-06-04 23:04:42 +00:00
|
|
|
int timeout;
|
2003-03-16 20:13:28 +00:00
|
|
|
} dvb_priv_t;
|
|
|
|
|
|
|
|
|
2003-08-11 00:02:46 +00:00
|
|
|
#define TUNER_SAT 1
|
|
|
|
#define TUNER_TER 2
|
|
|
|
#define TUNER_CBL 3
|
2005-01-06 09:43:10 +00:00
|
|
|
#define TUNER_ATSC 4
|
2003-03-16 20:13:28 +00:00
|
|
|
|
2003-08-11 00:02:46 +00:00
|
|
|
extern int dvb_step_channel(dvb_priv_t *, int);
|
2004-04-26 21:22:33 +00:00
|
|
|
extern int dvb_set_channel(dvb_priv_t *, int, int);
|
2006-02-09 14:08:03 +00:00
|
|
|
extern dvb_config_t *dvb_get_config(void);
|
2003-03-16 20:13:28 +00:00
|
|
|
|
|
|
|
#endif
|