Added -vo matrixview
[mplayer/kovensky.git] / stream / dvbin.h
blobdcb22ce238e1d0cad5ce0e2738c03a0106506142
1 /* Imported from the dvbstream project
3 * Modified for use with MPlayer, for details see the changelog at
4 * http://svn.mplayerhq.hu/mplayer/trunk/
5 * $Id$
6 */
8 #ifndef MPLAYER_DVBIN_H
9 #define MPLAYER_DVBIN_H
11 #include "stream.h"
13 #define SLOF (11700*1000UL)
14 #define LOF1 (9750*1000UL)
15 #define LOF2 (10600*1000UL)
17 #ifdef CONFIG_DVB_HEAD
18 #include <linux/dvb/dmx.h>
19 #include <linux/dvb/frontend.h>
20 #include <linux/dvb/version.h>
21 #else
22 #include <ost/dmx.h>
23 #include <ost/sec.h>
24 #include <ost/frontend.h>
25 #define fe_status_t FrontendStatus
26 #define fe_spectral_inversion_t SpectralInversion
27 #define fe_modulation_t Modulation
28 #define fe_code_rate_t CodeRate
29 #define fe_transmit_mode_t TransmitMode
30 #define fe_guard_interval_t GuardInterval
31 #define fe_bandwidth_t BandWidth
32 #define fe_hierarchy_t Hierarchy
33 #define fe_sec_voltage_t SecVoltage
34 #define dmx_pes_filter_params dmxPesFilterParams
35 #define dmx_sct_filter_params dmxSctFilterParams
36 #define dmx_pes_type_t dmxPesType_t
37 #endif
39 #undef DVB_ATSC
40 #if defined(DVB_API_VERSION_MINOR)
42 /* kernel headers >=2.6.28 have version 5.
44 * FIXME: are there any real differences between 3.1 and 5?
47 #if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5
48 #define DVB_ATSC 1
49 #endif
51 #endif
54 #define DVB_CHANNEL_LOWER -1
55 #define DVB_CHANNEL_HIGHER 1
57 #include "inttypes.h"
59 #ifndef DMX_FILTER_SIZE
60 #define DMX_FILTER_SIZE 16
61 #endif
63 typedef struct {
64 char *name;
65 int freq, srate, diseqc, tone;
66 char pol;
67 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt;
68 fe_spectral_inversion_t inv;
69 fe_modulation_t mod;
70 fe_transmit_mode_t trans;
71 fe_bandwidth_t bw;
72 fe_guard_interval_t gi;
73 fe_code_rate_t cr, cr_lp;
74 fe_hierarchy_t hier;
75 } dvb_channel_t;
77 typedef struct {
78 uint16_t NUM_CHANNELS;
79 uint16_t current;
80 dvb_channel_t *channels;
81 } dvb_channels_list;
83 typedef struct {
84 int type;
85 dvb_channels_list *list;
86 char *name;
87 int devno;
88 } dvb_card_config_t;
90 typedef struct {
91 int count;
92 dvb_card_config_t *cards;
93 void *priv;
94 } dvb_config_t;
96 typedef struct {
97 int card;
98 int fe_fd;
99 int sec_fd;
100 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt;
101 int dvr_fd;
103 dvb_config_t *config;
104 dvb_channels_list *list;
105 int tuner_type;
106 int is_on;
107 int retry;
108 int timeout;
109 int last_freq;
110 } dvb_priv_t;
113 #define TUNER_SAT 1
114 #define TUNER_TER 2
115 #define TUNER_CBL 3
116 #define TUNER_ATSC 4
118 int dvb_step_channel(stream_t *, int);
119 int dvb_set_channel(stream_t *, int, int);
120 dvb_config_t *dvb_get_config(void);
121 void dvb_free_config(dvb_config_t *config);
123 #endif /* MPLAYER_DVBIN_H */